Re:A (Draft) Taxonomy of SIMD Usage
by Remnant44 on Sunday June 09, 2024 @10:51PM
(#40629667)
I've done a fair amount of floating point simd programming for what the article calls type 1 - iterate large amounts of data as quickly as possible on the CPU.
I've been increasingly finding lately that integer-simd programming is incredibly useful to speed up all kinds of sorting searching filtering etc operations, even in otherwise scalar code. A lot of this kind of non-numeric code doesn't have any performance requirements, but it's very satisfying to be able to use when you run into situations that do.
Re:A (Draft) Taxonomy of SIMD Usage
by Const-me on Wednesday June 12, 2024 @05:50AM
(#40656309)
Exotic is the most interesting one. For example, I recently needed a fast way to flip order of bits in each byte of a long buffer. Did that in 8 AVX2 instructions / 32 bytes (which include load and store), by using 16-bytes long lookup tables for VPSHUFB.
Re:A (Draft) Taxonomy of SIMD Usage
by Const-me on Thursday June 13, 2024 @01:04PM
(#40672065)
> guessing AND/PSHUFB for low nibble, SHIFT/AND/PSHUFB for high nibble, OR to combine
Yeah, that’s exactly what I did in my C++ code with intrinsics.
About ISA extensions, I’m lucky to work on a professional CAM/CAE software. We have specified AVX2 in the system requirements, I’m guaranteed to have the support on our customer’s computers. However, very few of them have AVX512 CPUs so we are ignoring that thing so far.
I've been increasingly finding lately that integer-simd programming is incredibly useful to speed up all kinds of sorting searching filtering etc operations, even in otherwise scalar code. A lot of this kind of non-numeric code doesn't have any performance requirements, but it's very satisfying to be able to use when you run into situations that do.
If you have AVX-512, GFNI is faster for this task, but obviously many situations where you can't use it.
Yeah, that’s exactly what I did in my C++ code with intrinsics.
About ISA extensions, I’m lucky to work on a professional CAM/CAE software. We have specified AVX2 in the system requirements, I’m guaranteed to have the support on our customer’s computers. However, very few of them have AVX512 CPUs so we are ignoring that thing so far.