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

use squaredNorm() in loops where applicable for some cpu savings #151

Merged
merged 2 commits into from
Feb 16, 2025

Conversation

skohlbr
Copy link
Contributor

@skohlbr skohlbr commented Feb 15, 2025

This changes places where norm() is computed in loops to use squaredNorm() instead and compare against the squared threshold, avoiding a large number of sqrt computations that are not really needed. Maybe not significant in the grand scheme of things, but a rather low hanging fruit optimization opportunity.

@koide3
Copy link
Owner

koide3 commented Feb 16, 2025

Thanks for your contribution!

@koide3 koide3 merged commit 42996a9 into koide3:master Feb 16, 2025
1 of 7 checks passed
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.

2 participants