Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: optimize LcmInt for small inputs
This gives a tiny speed boost, but more importantly, avoids unnecessary allocation of temporary memory Before: gap> for i in [1..10000000] do LcmInt(2^50*13, 2^50*17); od; time; 2655 gap> for i in [1..10000000] do LcmInt(2^60*13, 2^60*17); od; time; 4450 gap> for i in [1..10000000] do LcmInt(2^70*13, 2^70*17); od; time; 5831 After: gap> for i in [1..10000000] do LcmInt(2^50*13, 2^50*17); od; time; 2381 gap> for i in [1..10000000] do LcmInt(2^60*13, 2^60*17); od; time; 4505 gap> for i in [1..10000000] do LcmInt(2^70*13, 2^70*17); od; time; 5854
- Loading branch information