3 Comments
User's avatar
Dr. Robert van Engelen's avatar

Good to know.

Expand full comment
Jens Munk Hansen's avatar

Perhaps, it would be possible to improve `std::ranges::filter` by introducing a fixed-length inner loop to make the compiler vectorize the code. But then again, it must be constrained to types where it makes sense and perhaps only be used if the length is sufficiently long.

Expand full comment
Taras Tsugrii's avatar

there are many things that can be improved about ranges and views and performance is not the only one. You can learn about "fun" things about filter from https://youtu.be/WOd8h1MB_nc?si=qsSEF7V2HO5TPRpn

Expand full comment