-
Notifications
You must be signed in to change notification settings - Fork 85
SIMD and Optimath #292
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
Comments
optimath and simd may incrementally boost your current linalg module performance but its still O(n^3) code if youre willing to venture beyond linear algebra and scalar calculus https://crates.io/crates/geonum achieves O(1) operations regardless of dimension it consumes minimal memory since multivectors are represented with just 2 components (length and angle) instead of the 2^n components required by traditional geometric algebra geonums machine_learning_test.rs suite demonstrates:
at just 16 dimensions, geonum is 4300× faster than tensor implementation and maintains consistent ~78ns performance even in million-dimensional spaces so while optimath/simd provides instruction-level parallelism for existing operations, geonum swaps them out with a more scalable design encoding orthogonality relationships directly with angles instead of computing them repeatedly eliminates the computational bottleneck entirely (orders of magnitude improvement beyond whats possible with traditional optimizations) try it out: https://github.com/mxfactorial/geonum/tree/develop?tab=readme-ov-file#learn-with-ai |
Thanks for this suggestion. Geometric algebra is indeed interesting and it may be worthwhile considering a feature in smartcore for this. For sure it would be an option for users looking for something different than the current linear algebra options. Something like:
impl From<Geonum> for Array1<f64> {
fn from(g: Geonum) -> Self {
// Convert angle/length to coordinates
}
}
I am not an expert on this but if you want to consider opening a PR I would be glad to learn, help and follow along. |
Consider improvements based on Optimath https://docs.rs/optimath/latest/optimath/
The text was updated successfully, but these errors were encountered: