Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: optimize sparse matrix casting with python tuple #4064

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Jul 13, 2022

Description

  • Optimizes the Eigen sparse matrix construction by using a py::tuple instead of requiring a cast from std::tuple.

Suggested changelog entry:

* Optimize Eigen sparse matrix casting by removing unnecessary temporary.

@Skylion007 Skylion007 requested review from rwgk and henryiii July 13, 2022 22:01
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have some kind of estimate how much this helps (to inform where it is worth it in general to optimize), but this is obviously a good change.

@Skylion007
Copy link
Collaborator Author

Probably not worth much perf to be honest, but I was staring at the code and noticed it was obviously wrong / bad style. Will just remove some unnecessary instructions.

@Skylion007 Skylion007 merged commit bc9315f into pybind:master Jul 13, 2022
@Skylion007 Skylion007 deleted the skylion007/eigen-sparse-pytuple branch July 13, 2022 23:27
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jul 13, 2022
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants