aboutsummaryrefslogtreecommitdiff
path: root/src/block.rs
AgeCommit message (Collapse)Author
2025-04-11manually compute Block ^ BlockDaniel Schadt
This gives around 30% speedup, presumably because casting to the int is more expensive than I thought. This operation is used so frequently in the hot loop that even a tiny speedup can add up quickly.
2025-04-10unroll Block::mulDaniel Schadt
We only ever use this function for small factors, either 2 (in Block::exp), or 0-7 (in e, after the modulo 8). Therefore, for those small values, we hard-code how they are computed by manually unrolling the loop/recursion. This gives around 30% more throughput.
2025-04-10rewrite Block::clipDaniel Schadt
doesn't change performance, but is nicer to read
2025-04-09speed up multiplicationDaniel Schadt
2025-04-09fix overflow for long messagesDaniel Schadt
2025-04-05use proper Block struct and operator overloadingDaniel Schadt