|
|
|
|
|
by glangdale
1755 days ago
|
|
Pretty much every instruction that doesn't start with the name of some known crypto algorithm (and maybe some that do) are useful for general-purpose stuff. I've had a good deal of success making Intel's GFNI do "weird off-label things" (bit-matrix transpose and a lot of the missing byte shift/rotate operations just scratches the surface). CLMUL is a good one for all sorts of things, as it can be used for XOR-parallel-prefix (we used it to detect quote pairs in simdjson). I don't know whether I resent crypto because it gets the cool instructions at low latency because it's so important, or whether I love it due to the fact that even the "leavings at the crypto table" are computationally useful. |
|
Base RISCV even lacks CLZ/popcount -- so it's a step backward from other popular architectures.
That said the stuff in bitmanip and crypto looks pretty good, so if they actually end up in chips that will be nice. On the other hand it's not clear how much awesome code will get written really exploiting them when they aren't everywhere-- which is probably why we're in this situation to begin with.