bepu / bepuphysics2

Pure C# 3D real time physics simulation library, now with a higher version number.
Apache License 2.0
2.25k stars 261 forks source link

Regressions on 16-wide vectors #296

Open RossNordby opened 8 months ago

RossNordby commented 8 months ago

Stuff like gather transposition has a fast path for 8-wide AVX acceleration. If the platform/compiler exposes 16-wide operations, that codepath is skipped in favor of the much slower fallback.

The gathers are the most notable case, but it'd be wise to check for other cases where 16-wide vectors would force a bad scalar fallback.

neon-sunset commented 6 months ago

Vector<T> does not use AVX512 in .NET 8 by default and may not even support it with env flag that overrides its preferred length. Though it would be nice to see a path for efficient transposition on ARM64 there as well (which has good codegen for loading/storing vector pairs and big ARM cores tend to have more SIMD units than x86 CPUs (both Cortex-X4 and Apple cores have 4x128).