Closed trizen closed 1 year ago
Was:
$ make >/dev/null && perl -Iblib/lib -Iblib/arch ~/tmp/znorder-lcm.pl
znorder(a,n) took: 6.134748 seconds
lcm(znorder(a, p^e)) took: 0.00322 seconds
Now (code not commited yet)
$ make >/dev/null && perl -Iblib/lib -Iblib/arch ~/tmp/znorder-lcm.pl
znorder(a,n) took: 0.002527 seconds
lcm(znorder(a, p^e)) took: 0.00324 seconds
Currently, when
n
is large and has many small prime factors,znorder(a,n)
is quite slow, but it can be made much faster by using the following identity:Example:
Output: