factor: benchmark the numbers that stress factorization - #14793
Conversation
* src/uu/factor/benches/factor_bench.rs (hard): New module. Products of several primes of similar, moderate size are where a factorization regression shows up first: trial division finds nothing, Pollard's rho has to run for a while before it splits anything, and any O(n^(1/4)) fallback never finishes. The prime power is there because rho cannot split p^k at all, so a regression in the perfect-power check is a hang rather than a slowdown, and the Mersenne prime is all primality testing and no factoring. Sample counts are capped so the group takes about fifteen seconds rather than several minutes.
16c23a7 to
ae3e119
Compare
Merging this PR will regress 1 benchmark
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
|
GNU testsuite comparison: |
Products of several primes of similar, moderate size are where a factorization regression shows up first: trial division finds nothing, Pollard's rho has to run for a while before it splits anything, and any O(n^(1/4)) fallback never finishes. The prime power is there because rho cannot split p^k at all, so a regression in the perfect-power check is a hang rather than a slowdown, and the Mersenne prime is all primality testing and no factoring.
Sample counts are capped so the group takes about fifteen seconds rather than several minutes.
should be improved by uutils/num-prime#114