2 ms·
It would be possible to make iterators more SIMD-friendly than they are today but that would come at the cost of interpreting what the user might have intended
by the8472 3y ago
It would be possible to make iterators more SIMD-friendly than they are today but that would come at the cost of interpreting what the user might have intended and then dropping or introducing additional side-effects (e.g. by skipping things or grabbing a few more items than needed).
Without an effects system that makes purity available on the type level libraries can't even conservatively apply those optimizations on pure lambdas because they have no way to tell the pure and impure ones apart.