arduano / simdeez

easy simd
MIT License
332 stars 25 forks source link

Simd widths stored in the base traits #56

Closed arduano closed 1 year ago

jackmott commented 1 year ago

Something to keep in mind, not related to this in particular, is some of the weird choices I made years ago with traits were to reduce compile times by a factor of 10. So on the one hand, keep an eye on compile times as a seemingly innocuous change might explode them.

Or maybe the Rust compiler no longer has the same issues and you are free to refactor things for clarity/simplicity instead.

arduano commented 1 year ago

Huh, that sounds pretty bizarre. Personally, I've never had issues that drastic with the rust compiler in the ~3 years I've used it

But yeah I'll keep that in mind, I'll start benchmarking it too

jackmott commented 1 year ago

IIRC it was related to having tons of traits on a type, grouping the traits into chunks dropped compile time from like 6 minutes to under a minute. There was something supra-linear in the compiler, and maybe they fixed it. If you delve into old commits you can probably see where I made the change.

arduano commented 1 year ago

Btw, my main goal at the moment is to move as much as possible out of the main Simd trait and into the actual value traits (smallint, float). That would also let me greatly clean up the overloads.rs files because I can just implicitly implement those operators on every type that implements the simd value traits