factor: 30% faster code (estimate max possible factor just once)
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 9 Apr 2017 20:54:57 +0000 (22:54 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 9 Apr 2017 20:54:57 +0000 (22:54 +0200)
commit1d232fd44026deae94c88200766152aec9d6c5e5
tree2512e5d107d26346c583b5ff25fd8c74cef69cd8
parentc1b5b2a19016804f4330b36d9b69a64ccd59cb1c
factor: 30% faster code (estimate max possible factor just once)

function                                             old     new   delta
factorize                                              -     161    +161
isqrt_odd                                              -     102    +102
factor_main                                          281     110    -171
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/1 up/down: 263/-171)           Total: 92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/factor.c