Hacker News new | ask | show | jobs
by janwas 1481 days ago
CPU vendors have recently introduced SVE (Arm) and RVV (RISC-V) and we support those in Highway and thus also vqsort.

It's definitely interesting to discuss std::sort benefitting from such optimizations, but "very easy" seems rather optimistic.

1 comments

Do you expect these optimizations making their way into std::sort eventually?
It depends on the goals of the library maintainers. Users who really care about speed may already be using another library such as PDQsort or ips4o. Given that, the stdlib maintainers may reason that adding code and 'complexity' (not all developers understand or are able to maintain SIMD) is not worthwhile.

Conversely, they may prefer to work towards the standard library being the fastest known way of doing things. This is now much more feasible given the single portable implementation, vs. having to rewrite thousands of lines for six instruction sets.

Not sure which consideration carries more weight.