[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Math::Prime::Util and Math::Prime::Util::GMP



On 12/19/2012 04:35 AM, Dominique Dumont wrote:
> The point is to indicate what kind of functionality this factor program will 
> bring. The user does not (usually) care about the implementation language.

the thing is, the functionality of factor.pl is exactly the same as that
of /usr/bin/factor.

The differences i can see are:

 * coreutils' factor appears to be limited to inputs <= MAXINT, while
factor.pl can handle arbitrary size input.

 * factor.pl is significantly slower (not least just from a baseline
task of loading the perl interpreter):  for a non-trivial large factor
close to 2^63 on this amd64 machine, coreutils' factor consumes
0.004s(user)+0.000s(sys) of CPU time and factor.pl consumes
0.048s(user)+0.008s(sys) of CPU time.

> Another example of such a rename is the node program from nodejs project. 
> /usr/bin/node has been renamed to /usr/bin/nodejs (not node.js)
> 
> You can add a prefix or a suffix. For example that comes into mind is "math-
> factor". I'm sure a better name can be found.

hm.  i'm not convinced.  this does what one would expect (factors its
input) and it does so in the same way (and with the same output format)
as the more-common utility from coreutils.  The difference is that it's
the perl implementation.

By your argument, shouldn't coreutils also change the name of
/usr/bin/factor?  If it did, we'd be back in the same scenario again :/

	--dkg


Reply to: