AdamNiederer / faster

SIMD for humans
Mozilla Public License 2.0
1.56k stars 51 forks source link

Arbitrary collect support #35

Open vorner opened 6 years ago

vorner commented 6 years ago

I noticed that some methods return Vecs. In particular, it's stride and scalar_collect. I was wondering if it made sense to expose generic version that could use arbitrary FromIterator type. My motivation for this is:

The original methods could still be preserved, as wrappers with Vec implementation. Does it make sense? Should I send a pull request for that?

AdamNiederer commented 6 years ago

I like the idea of replacing scalar_collect with something more generic, but I'm curious about what it would mean for applications which process data which is too large to store on the stack. It sounds like a fully generic and no-std implementation would need to collect into some kind of stack-based array and then call T::from_iter() with it regardless of system.

0.5.0 already breaks a ton of the public API presented in 0.4.3, so feel free to rip and tear if you do decide to send a PR.