Open paulcscharf opened 5 years ago
I assume we would be using this as underlying types. Would we still support conversion to OpenTK natively in our library? Alternatively if we can cut out the actual dependencies on OpenTK, we could always consider having the conversions to OpenTK types as extension methods in Bearded.Utilities.OpenTK, making the OpenTK dependency completely optional.
That being said, I am not so sure whether it will be faster than OpenTK types. I've noticed they're really focusing on performance of operations of things like Vector multiplication in that library, so the only way System.Numerics would be faster is if they do some fancy stuff, which I doubt.
They do fancy stuff, yes, they compile to SIMD operations when available. Maybe OpenTK has doing that too, or gonna do at some point, but if so I'm not aware.
https://github.com/jackmott/LinqFaster
This library seems to have some optimisations for not just Linq, but also SIMD, in case that was a blocker or something we wanted to consider.
Just leaving this here so we don't lose the linq (pun intended) in the future.
Since we use many of our own types, we might be able to use vector and matrix types from System.Numerics instead of OpenTK types which may result in significant speedups with calculations.
We should look into this!