|
|
|
|
|
by crote
1061 days ago
|
|
Anything which works on nontrivial datasets, really. As soon as you need to do roughly the same operation on a bunch of data, you can benefit from AVX. Heck, this could be as simply as determining the length of a string! The main benefit of AVX-512 is that the CPU gained support for "masking". Traditionally, you had to execute the instructions on all data elements. Something like "round all even values downwards, round all odd values upwards" becomes near-impossible, and if you want to do that in an entire AVX pipeline you have to deconstruct the vector into individual elements, do the operation on each of them individually, and reconstruct it into a vector. This really sucks. With masking, you get a special field which specify on which elements the operation should apply. So you could just create a mask with the even values, use that mask for a round-down, invert the mask, and use it for a round-up. That's a significant speedup! Adding AVX-512 support means that a lot more applications suddenly become eligible for fairly trivial vectorization, and I personally can't wait for it to become universally available. |
|