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

Optimize vec_transform #102

Merged
merged 2 commits into from
Feb 22, 2025
Merged

Optimize vec_transform #102

merged 2 commits into from
Feb 22, 2025

Conversation

Korijn
Copy link
Contributor

@Korijn Korijn commented Feb 22, 2025

  • All operations are performed inplace on the vectors array
  • Adds test for batch support (it already worked)
  • Adds optional argument projection=True to vec_transform which, when set to False (to indicate no projection needs to be performed)
    • Skips homogeneous coordinate allocation
    • Performs matrix multiplication only on the 3x3 part of the matrix (scale+rotation)
    • Directly adds the translation component

@panxinmiao this should be much faster. you can use it in your sorting key function with projection=False

@Korijn Korijn changed the title Optimize vec transform Optimize vec_transform Feb 22, 2025
@Korijn Korijn merged commit ca09f0c into main Feb 22, 2025
10 checks passed
@Korijn Korijn deleted the optimize-vec-transform branch February 22, 2025 12:41
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