On 7/8/20 12:34 PM, Torbjörn Granlund wrote: > Any number which does not happen to be B-smooth for, say B < 2^30, will > show easily measurable performance difference of 5x to 40x IIRC. Ah, I had tried the example in the manual, (2^31 - 1) * (2^61 - 1). Even though it isn't B-smooth for B < 2^30, the performance difference was only 2x on my machine. I just now tried 2^127 - 1 and saw a similar performance difference, but 2^127 - 3 had a 15x difference so it's a better example. I installed the attached to try to document this better. > I have a patch which makes the non-GMP code some 2x - 3x faster. It's > been maturing for several years now, so I suppose I should really finish > it. (It got tangled with code which improves the GMP case by letting it > fall into the non-GMP code as numbers get smaller. That sounds simple > but is quite messy for various reasons. It is also not clear how much > complexity we could defend for this command of limited utility.) Yes, 'factor' is just a minor utility needed for POSIX compliance. Although it'd be nice to get that 2x-3x improvement whenever you have the time, it's not urgent. Thanks for your guidance on the GMP issue.