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

kbsemi example which works in 4.11 but becomes slow in 4.12 #5045

Closed
ChrisJefferson opened this issue Sep 11, 2022 · 2 comments · Fixed by #5176
Closed

kbsemi example which works in 4.11 but becomes slow in 4.12 #5045

ChrisJefferson opened this issue Sep 11, 2022 · 2 comments · Fixed by #5176
Labels
topic: performance bugs or enhancements related to performance (improvements or regressions)

Comments

@ChrisJefferson
Copy link
Contributor

ChrisJefferson commented Sep 11, 2022

The following code worked in 4.11, but seems to enter an infinite loop in 4.12.

The first commit where this is broken is 65ca9e6, which was written by @hulpke . I realise that relations over free monoids can always enter an infinite loop in the worst case, but thought it was worth reporting.

  F := FreeMonoid("x", "y", "z"); 
 generators := GeneratorsOfMonoid(F);
 x := generators[1];
  y := generators[2];
 z := generators[3];
 e := Identity(F);
  relations:= [[x^2237, e], [y^2237, e], [z^2237, e],[x^28,y^19*z^9],[y^13,x^13*z^17],[z^42,x^8*y^17],[x*y, y*x], [x*z, z*x], [y*z, z*y]];
  
  G := F/relations;
 generators := GeneratorsOfMonoid(G);
 x := generators[1];
 y := generators[2];
 z := generators[3];
 e := Identity(G);
 elements := Elements(G);
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Sep 12, 2022
@hulpke
Copy link
Contributor

hulpke commented Sep 16, 2022

Are you sure it is an infinite loop? The commit just changes lookup, so my guess is that for so large exponents (2237) the new version of lookup used becomes slow.

(Note that the different lookup provides a huge speedup to standard cases of groups)

If someone can determine that indeed it will not terminate let me know and I'll have a look.

@hulpke hulpke added topic: performance bugs or enhancements related to performance (improvements or regressions) and removed kind: bug Issues describing general bugs, and PRs fixing them labels Sep 16, 2022
@hulpke
Copy link
Contributor

hulpke commented Sep 16, 2022

Just to confirm that this is not a bug but slower performance on this example (because of the huge exponents). Part is that the older code was kernel while the newer one is only library. Part is the question on how to execute a collection process efficiently.

hulpke added a commit to hulpke/gap that referenced this issue Sep 17, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
hulpke added a commit to hulpke/gap that referenced this issue Sep 29, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
hulpke added a commit to hulpke/gap that referenced this issue Oct 19, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
hulpke added a commit to hulpke/gap that referenced this issue Oct 28, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
hulpke added a commit to hulpke/gap that referenced this issue Oct 28, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
hulpke added a commit to hulpke/gap that referenced this issue Oct 28, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves gap-system#5045
@hulpke hulpke changed the title kbsemi example which works in 4.11 but enters infinite loop in 4.12 kbsemi example which works in 4.11 but becomes slow in 4.12 Oct 28, 2022
fingolfin pushed a commit that referenced this issue Nov 6, 2022
After replacing, step a bit back, not to start. This handles cases of
pulling a generator a past a longer line of b's.

This resolves #5045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: performance bugs or enhancements related to performance (improvements or regressions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants