Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More optimizations for integer functions #2061

Merged
merged 3 commits into from
Jan 17, 2018

Commits on Jan 15, 2018

  1. kernel: optimize RootInt via new kernel function ROOT_INT

    Before:
    
    gap> SumX([0 .. 100000], [2,3,5,7,251,256], RootInt);; time;
    784
    gap> SumX([0 .. 100000], [2,3,5,7,251,256], {n,k}->RootInt(2^100+n,k));; time;
    1890
    
    After:
    
    gap> SumX([0 .. 100000], [2,3,5,7,251,256], RootInt);; time;
    293
    gap> SumX([0 .. 100000], [2,3,5,7,251,256], {n,k}->RootInt(2^100+n,k));; time;
    775
    fingolfin committed Jan 15, 2018
    Configuration menu
    Copy the full SHA
    aace443 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e04c56 View commit details
    Browse the repository at this point in the history
  3. Tweak PartialFactorization call when proving primality

    Namely, by passing it the 'cheap' option (which implies the FactIntPartial
    option), as the surrounding code would suggest. This makes calling e.g.
    
      IsPrimeInt(100000000000000000000000000000000000000000000000151);
    
    with FactInt loaded almost as fast as without it loaded.
    fingolfin committed Jan 15, 2018
    Configuration menu
    Copy the full SHA
    facf179 View commit details
    Browse the repository at this point in the history