Opened 3 years ago
Last modified 4 weeks ago
#28114 new enhancement
Back tableaux by Numpy arrays where possible
Reported by: | Erik Bray | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.8 |
Component: | combinatorics | Keywords: | |
Cc: | Nicolas M. Thiéry, zerline, Florent Hivert, Travis Scrimshaw | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
As #28106 demonstrates, although it is perhaps a somewhat extreme case, constructing large classes of tableaux can be very memory-hungry, as the StandardTableaux(50)
case demonstrates (it chews up nearly a gigabyte of RAM).
In many cases, most individual tableaux can be represented as a single flat numpy array of small ints (8-bit unsigned for example) containing their shape data, which would save significant space. Having tableaux stored as Numpy arrays may also help speed up some algorithms, but I'm not sure about any specific cases.
Change History (11)
comment:1 Changed 3 years ago by
Cc: | Florent Hivert Travis Scrimshaw added |
---|
comment:2 Changed 3 years ago by
I wondered if maybe that was a possibility as well, but 8-bit numpy arrays would still probably be the most efficient.
I figured it was probably considered before but I didn't see a ticket for it.
comment:3 Changed 3 years ago by
Also doctesting sage -t --long src/sage/combinat/tableau.py
uses over a gigabyte of ram (RSS), what are you testing that you can't test in, say, half a gig of ram? This is probably the most memory-hungry file in the testsuite.
comment:4 Changed 3 years ago by
Milestone: | sage-8.9 → sage-9.1 |
---|
Ticket retargeted after milestone closed
comment:5 Changed 2 years ago by
Milestone: | sage-9.1 → sage-9.2 |
---|
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.
comment:6 Changed 2 years ago by
Milestone: | sage-9.2 → sage-9.3 |
---|
comment:7 Changed 20 months ago by
Milestone: | sage-9.3 → sage-9.4 |
---|
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:8 Changed 14 months ago by
Milestone: | sage-9.4 → sage-9.5 |
---|
comment:9 Changed 9 months ago by
Milestone: | sage-9.5 → sage-9.6 |
---|
comment:10 Changed 6 months ago by
Milestone: | sage-9.6 → sage-9.7 |
---|
comment:11 Changed 4 weeks ago by
Milestone: | sage-9.7 → sage-9.8 |
---|
Thanks for the update. The plan was to use ClonableArray?'s / IntArrays?. Numpy arrays could be an alternative indeed.