#17477: "Internal" documentation of posets
-------------------------+-------------------------------------------------
Reporter: | Owner:
jmantysalo | Status: needs_review
Type: | Milestone: sage-6.5
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: Nathann Cohen
combinatorics | Work issues:
Keywords: poset | Commit:
Authors: | 8ecc92457eef2cc2264bc7bcb2ef3f03d57add75
Report Upstream: N/A | Stopgaps:
Branch: |
public/17477 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
> Aha. I think that Sage could have some kind of system-level setting for
memory-cpu -tradeoff. Sometimes saving, for example, le-matrix, may not be
right thing to do.
Ahahaha. No, I swear that in our current implementation it is *always* the
right thing to do. The term 'dense matrix' may be scary, but a matrix of
bits is infinitely more compact than a list of adjacences stored with
pointers and stuff. Infinitely more compact that all Python objects we
store for nothing.
Look: the `BooleanLattice` poset on 2^11 elements seems to take 320Mb in
memory (no idea why it is so expensive):
{{{
sage: m1 = get_memory_usage()
sage: p = posets.BooleanLattice(11)
sage: round(get_memory_usage()-m1)
321.0
}}}
How much does it cost to store the dense binary matrix ? Simple, you need
(2^11)^2 bits. That means ... 4 Mb = 500kB.
And we (still) live in a world where all posets you generate are stored
forever uselessly, where you have 64-bits pointers everywhere and stuff.
Really, those 4Mb are far from accounting for any of our memory problems
`:-P`
> Yes, I think this is ready. Or at least better than no documentation at
all.
Okay, positive review then !
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/17477#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.