SIMDeez includes a native, pure-Rust SIMD math surface exposed through simdeez::math and simdeez::prelude.
The public surface covers:
- core log/exp:
log2_u35,exp2_u35,ln_u35,exp_u35 - trig and inverse trig:
sin_u35,cos_u35,tan_u35,asin_u35,acos_u35,atan_u35,atan2_u35 - hyperbolic and inverse hyperbolic:
sinh_u35,cosh_u35,tanh_u35,asinh_u35,acosh_u35,atanh_u35 - binary misc:
log10_u35,hypot_u35,fmod
- Most
f32families use portable SIMD by default. f32 log2_u35keeps an AVX2 override where local benchmarks justify it.- Revived
f64log/exp, inverse trig, and binary-misc families keep SIMD defaults. - Some
f64families intentionally remain mixed or scalar-reference where local rescue passes did not justify a SIMD default.
The maintained pattern is:
- start with portable SIMD kernels
- add dispatch glue without changing the public API
- add backend-specific overrides only where profiling justifies them
- keep scalar-lane patching centralized for exceptional semantics
The restored f32 path in src/math/f32/ is the clearest reference implementation of that layering.
Criterion targets for the math surface:
cargo bench --bench simd_math
cargo bench --bench simd_math_remaining_baselineThese benches report native scalar, runtime-selected, and forced backend variants such as scalar, sse2, sse41, avx2, and avx512 when available.