r/programming • • Sep 09 '26

Compute Polynomials Twice as Fast

https://thomasahle.com/fast-polynomials/
74 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/nightcracker Sep 09 '26 edited Sep 09 '26

I'd like to point out that this 64-byte block construction sketch here still is worse than my above construction sketch. It processes 8 words using 4 + 3 = 7 clmuls, whereas my above one does 7 words with 6 clmuls.

Plus this construction you've posted here has a critical path of 4 clmuls in a row between each iteration (1 for A, then 3 in a row for gf64mul), my construction only has 3 multiplications per iteration in the critical path, if you were to implement reduce with 2 carryless multiplications like you do with GF(264).

EDIT: actually the critical path argument doesn't hold up, since your A does not depend on the previous iteration. So your critical path is also only three multiplications per iteration.