Skip to content

Conversation

@Korijn
Copy link
Contributor

@Korijn Korijn commented Feb 23, 2025

Follow-up to #103

  • The code felt messy so I wanted to clean it up and make it DRY
  • I felt like the projection=True code could be faster too, and it did measurably become a bit faster
  • Turns out leaving out the up-front type conversions leads to the same precision and performs as well or better

Average per call timings:

# N=100000
vec_transform (projection=True) 3.6813059999258257e-06
vec_transform (projection=False) 2.56878800020786e-06
apply_matrix 2.81830899999477e-06

# N=1000
vec_transform (batch, projection=True) 0.002807431799999904
vec_transform (batch, projection=False) 0.002085096800001338
apply_matrix (batch) 0.0020407788000011353

@Korijn Korijn merged commit 3d8ee29 into main Feb 23, 2025
10 checks passed
@Korijn Korijn deleted the optimize-vec-transform-again branch February 23, 2025 14:06
@Korijn
Copy link
Contributor Author

Korijn commented Feb 23, 2025

This been released as v0.6.6

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