| ▲ | ThatGuyRaion 5 hours ago | |||||||
I suppose that makes sense -- though SIMD seems more useful for accelerating a lot of crypto? | ||||||||
| ▲ | sparkie 4 hours ago | parent [-] | |||||||
SIMD is for performing parallel operations on many smaller types. It can help with some cryptography, but It doesn't necessarily help when performing single arithmetic operations on larger types. Though it does help when performing logic and shift operations on larger types. If we were performing 128-bit arithmetic in parallel over many values, then a SIMD implementation may help, but without a SIMD equivalent of `addcarry`, there's a limit to how much it can help. Something like this could potentially be added to AVX-512 for example by utilizing the `k` mask registers for the carries. The best we have currently is `adcx` and `adox` which let us use two interleaved addcarry chains, where one utilizes the carry flag and the other utilizes the overflow flag, which improves ILP. These instructions are quite niche but are used in bigint libraries to improve performance. | ||||||||
| ||||||||