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

MeatAxe: implement and then use in-place matrix operations #5952

Open
fingolfin opened this issue Mar 10, 2025 · 0 comments
Open

MeatAxe: implement and then use in-place matrix operations #5952

fingolfin opened this issue Mar 10, 2025 · 0 comments

Comments

@fingolfin
Copy link
Member

Consider code like this in lib/meataut.gi:

        a:=a - a[r,c] * nilbase[i] / nilbase[i][r,c];

where a and nilbase[i] are square matrices.

This is highly inefficient: first the scalar division / creates a new matrix; then the scalar multiplication creates a second new matrix; then the subtraction a - ... creates a third, which is assigned to a.

Instead this could be done with zero allocations (well, assuming the field operations don't require allocations, which is the case for finite field elements). For larger examples this makes a substantial difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant