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

Fix slow dynamic cast for Point3 and Point2 #1168

Merged
merged 3 commits into from Apr 14, 2022
Merged

Fix slow dynamic cast for Point3 and Point2 #1168

merged 3 commits into from Apr 14, 2022

Conversation

ProfFan
Copy link
Collaborator

@ProfFan ProfFan commented Apr 12, 2022

Closes #1165

Before:
optimizer ran: 63 iterations, time took: 38.46747899055481 seconds, initial error: 7505.995184644436, final error: 5742.671242796094

After
optimizer ran: 63 iterations, time took: 4.811146020889282 seconds, initial error: 7505.995184644436, final error: 5742.671242796094

on my M1 max mac

@ProfFan ProfFan requested a review from dellaert April 12, 2022 17:58
@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 12, 2022

@shteren1

@ProfFan
Copy link
Collaborator Author

ProfFan commented Apr 12, 2022

Ping @dellaert for 2nd round review.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

I'll approve, but before merging, search in this file for all dynamic casts and handle them similarly? I have indicated one such case in the comments but there might be more.

Also, CI has to pass of course

gtsam/nonlinear/Values-inl.h Show resolved Hide resolved
@ProfFan ProfFan merged commit 415e41b into develop Apr 14, 2022
@ProfFan ProfFan deleted the fix/slow_cast branch April 14, 2022 18:57
@dellaert
Copy link
Member

Awesome !!!!

@ProfFan ProfFan changed the title Fix slow dynamic cast Fix slow dynamic cast for Point3 and Point2 Aug 17, 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.

optimization slowdown since 4.1.0 with python
2 participants