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

Validate arguments to ListPerm, and turn it into a kernel function to make it faster #5566

Merged
merged 3 commits into from
Jan 10, 2024

Commits on Jan 10, 2024

  1. ListPerm: improve docs, validate input

    Makes ListPerm about 5% slower on my system. Indeed, before this patch:
    
        gap> pi:=(1,2,3,4);;GASMAN("collect");;
        gap> for i in [1..10^7] do ListPerm(pi); od; time;
        1670
    
    After this patch:
    
        gap> pi:=(1,2,3,4);;GASMAN("collect");;
        gap> for i in [1..10^7] do ListPerm(pi); od; time;
        1760
    
    If there is concern about this, then one could simply turn ListPerm into
    a kernel function, which I estimate would make it about 5 times faster,
    based on this:
    
        gap> r:=[1..4];;pi:=(1,2,3,4);;GASMAN("collect");;
        gap> for i in [1..10^7] do OnTuples(r,pi); od; time;
        373
    fingolfin committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    a1009f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b6e573 View commit details
    Browse the repository at this point in the history
  3. kernel: rename lmp -> deg

    The old name and comment were misleading
    fingolfin committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    9f958e8 View commit details
    Browse the repository at this point in the history