Hacker News new | ask | show | jobs
by vardump 4018 days ago
Both "esoteric" examples were just picked from a larger set of data packing and FMA (fused multiply add) operations that high performance real life code needs and uses. Intel doesn't generally add instructions no one needs.

Unfortunately, compilers aren't indeed very good at picking optimal instructions when it could take good advantage of instructions such as these. No wonder, though.

Packing and unpacking are often needed in SIMD context. There are a lot of such instructions, including shuffles and permutes. Individually they may sound esoteric, but actually cover a nice number of real life data shuffling needs and are extremely fast.

Fused-multiply-add instructions can double effective FLOPS.

1 comments

I am well aware of the potential advantages of such operations. And the difficulties associated with trying to use them well and identify when they can be an advantage.

However, just because something is useful does not preclude it from being esoteric.

In particular, there are an astounding number of such miscellaneous and less-often-used instructions in x86 and extensions, and trying to remember which ones exist, and which ones have which limitations, is... a fair feat. Hence, esoteric. Understood only by a few with special knowledge or interest.