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

Building morphisms of graded modules takes unexpectedly long #2999

Closed
HechtiDerLachs opened this issue Nov 7, 2023 · 0 comments
Closed

Building morphisms of graded modules takes unexpectedly long #2999

HechtiDerLachs opened this issue Nov 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@HechtiDerLachs
Copy link
Collaborator

Try the following code:

S, (x, y, z) = graded_polynomial_ring(QQ, [:x, :y, :z])
m = ideal(S, gens(S))
S1 = graded_free_module(S, [0])
g = gens(m^29)
f = [f*S1[1] for f in g]

@time I, inc = sub(S1, f);

@time Oscar.SubModuleOfFreeModule(S1, f);

On my machine I get

julia> @time I, inc = sub(S1, f);
  0.160066 seconds (2.22 M allocations: 98.650 MiB, 52.27% gc time)

julia> @time Oscar.SubModuleOfFreeModule(S1, f);
  0.000013 seconds (10 allocations: 1.141 KiB)

which is a significant differences. In fact, using sub in bigger examples killed me.

Using ProfileView revealed that most of the time is spent in inferring the degree of the generators for the domain of the inclusion map inc. This looks to me as if there's room for improvement.

@jankoboehm ?

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

No branches or pull requests

2 participants