Opened 20 months ago

Last modified 3 weeks ago

#28114 new enhancement

Back tableaux by Numpy arrays where possible

Reported by: embray Owned by:
Priority: major Milestone: sage-9.4
Component: combinatorics Keywords:
Cc: nthiery, zerline, hivert, tscrim Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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 (7)

comment:1 Changed 20 months ago by nthiery

  • Cc hivert tscrim added

Thanks for the update. The plan was to use ClonableArray?'s / IntArrays?. Numpy arrays could be an alternative indeed.

comment:2 Changed 20 months ago by embray

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 20 months ago by vbraun

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 14 months ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:5 Changed 11 months ago by mkoeppe

  • Milestone changed from sage-9.1 to 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 6 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:7 Changed 3 weeks ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

Note: See TracTickets for help on using tickets.