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

Matrix multiplication is incredibly slow #48

Open
zickgraf opened this issue Aug 16, 2024 · 2 comments
Open

Matrix multiplication is incredibly slow #48

zickgraf opened this issue Aug 16, 2024 · 2 comments

Comments

@zickgraf
Copy link
Member

julia> using MatricesForHomalg

julia> Q = HomalgFieldOfRationals();

julia> M = HomalgIdentityMatrix(200, Q);

julia> @time M * M;
 14.694862 seconds (224.14 M allocations: 4.652 GiB, 32.85% gc time)
@zickgraf
Copy link
Member Author

Over the integers, things are a bit better but still very slow:

julia> Z = HomalgRingOfIntegers();

julia> M = HomalgIdentityMatrix(200, Z);

julia> @time M * M;
  1.984669 seconds (32.10 M allocations: 614.044 MiB, 33.34% gc time, 2.17% compilation time)

In native GAP, the multiplication takes only about a millisecond:

gap> M := IdentityMat( 200 );;
gap> CallFuncListWithTime(\*, [ M, M ]);;
0.0009120000000000001 Secs.

@mohamed-barakat
Copy link
Member

This is amazing.

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

2 participants