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

Avoid recomputing vacancy numbers for rigged configurations #20174

Closed
tscrim opened this issue Mar 7, 2016 · 8 comments
Closed

Avoid recomputing vacancy numbers for rigged configurations #20174

tscrim opened this issue Mar 7, 2016 · 8 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Mar 7, 2016

Many of rigged configuration operations, such as e() and f(), needlessly recompute the vacancy numbers. We simply need to tell the constructor to avoid doing these computations.

Also, because the Cartan matrices are sparse and general matrix implementation details, it is relatively expensive to iterate over the row. Instead, it is much fast to get the specific entry by CM[i,j].

CC: @sagetrac-sage-combinat @anneschilling @bsalisbury1

Component: combinatorics

Keywords: rigged configurations

Author: Travis Scrimshaw

Branch/Commit: 8591c4a

Reviewer: Anne Schilling

Issue created by migration from https://trac.sagemath.org/ticket/20174

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 7, 2016

comment:1

With branch:

sage: RC = RiggedConfigurations(['B',4,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 3.33 s, sys: 19.6 ms, total: 3.35 s
Wall time: 3.33 s
3441
sage: RC = RiggedConfigurations(['A',4,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 41.9 ms, sys: 4.27 ms, total: 46.1 ms
Wall time: 38.8 ms
100
sage: RC = RiggedConfigurations(['D',6,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 7.17 s, sys: 36 ms, total: 7.21 s
Wall time: 7.19 s
15544

vs old version

sage: RC = RiggedConfigurations(['B',4,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 12.5 s, sys: 45 ms, total: 12.5 s
Wall time: 12.5 s
3441
sage: RC = RiggedConfigurations(['A',4,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 97.5 ms, sys: 4.16 ms, total: 102 ms
Wall time: 88.4 ms
100
sage: RC = RiggedConfigurations(['D',6,1], [[2,1],[3,1]])
sage: %time len(list(RC))
CPU times: user 26.5 s, sys: 52.1 ms, total: 26.6 s
Wall time: 26.5 s
15544

Slightly annoying how simple changes these were and resulting in such a large speed gain...


New commits:

8d2decdAvoid needlessly recomputing the vacancy numbers.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 7, 2016

Commit: 8d2decd

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 7, 2016

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 7, 2016

Changed commit from 8d2decd to 8591c4a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 7, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

8591c4aSome other similar tweaks for highest weight/B(oo) RC crystals.

@tscrim

This comment has been minimized.

@anneschilling
Copy link

Reviewer: Anne Schilling

@vbraun
Copy link
Member

vbraun commented Mar 26, 2016

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

No branches or pull requests

3 participants