5 ms·
I'm using this comment as jumping point. What's cost/opportunity to optimizing for a specific platform/instruction set ? At what point is it worth doing, when
by jrimbault 4y ago
I'm using this comment as jumping point.
What's cost/opportunity to optimizing for a specific platform/instruction set ? At what point is it worth doing, when isn't it worth doing ? AVX-512 strikes as something... "ephemeral".
- skavi 4y agowriting code for SIMD can get you absolutely massive performance improvements. Whether it's worth the added complexity depends on the situation. If your data is already arranged in a cache friendly way (SoA), it shouldn't be incredibly difficult to use SIMD intrinsics to optimize. I'd first take a look at what the compiler is already generating for you to see if manual intervention is worth it.
- throwaway92394 4y agoWell I mean this article is demoing a 28% improvement (if I did my math right) for json parsing. Sure AVX-512 is only applicable to specific workloads, and even many of those workloads the cost/opportunity of optimizing for AVX-512 might not be worth it. But there clearly ARE usecases that would benefit, and it might be worth it for more consumer applications to optimize for AVX-512 - but only if it can be used. The way I see it is that the benefit of optimizing for AVX-512 is far higher if it becomes normal for consumer CPUs to have it. A 28% improvement is pretty decent, but it's only worth implementing if enough people can utilize it.
- beached_whale 4y agoFor many maybe not, but when writing the foundations of software it is good to start fast. There are libraries that abstract various simd architectures now too. Simdjson has their own and there are ones lile KUMI