Improve the performance of `factor' (more than 2x speed-up for large N).
authorJim Meyering <jim@meyering.net>
Sat, 3 Feb 2001 13:37:37 +0000 (13:37 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 3 Feb 2001 13:37:37 +0000 (13:37 +0000)
commit52377e246dd8f2c0fb902937c7c05db16b240700
treebc9490f4476a9f8ca5f020364e6b42a769678fac
parentc83137adb33d14ab8b48c076b30fc601fd83b4ca
Improve the performance of `factor' (more than 2x speed-up for large N).
(wheel_tab): New global table.
(WHEEL_START, WHEEL_END): Define.
(factor): Remove the loop that special-cased `2'.
Instead of incrementing by `2', use the offsets from the wheel table.
From Michael Steffens.
src/factor.c