Age | Commit message (Collapse) | Author |
|
|
|
(requires nightly compiler)
|
|
I've unrolled this earlier to speed up the computation for the commonly
used factors, but now we're precomputing the values anyway so there's no
reason to keep the code ugly.
|
|
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.
|
|
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.
|
|
doesn't change performance, but is nicer to read
|
|
|
|
|
|
|