Changes between Initial Version and Version 1 of Ticket #17408


Ignore:
Timestamp:
11/27/14 14:19:06 (6 years ago)
Author:
ncohen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17408

    • Property Status changed from new to needs_review
  • Ticket #17408 – Description

    initial v1  
    22
    33This branch re-implements it for acyclic graphs.
     4
     5Before
     6{{{
     7sage: g = posets.BooleanLattice(5).hasse_diagram().transitive_closure(); g = g.cartesian_product(g)
     8sage: %time Poset(g)
     9CPU times: user 1.3 s, sys: 8 ms, total: 1.3 s
     10Wall time: 1.29 s
     11Finite poset containing 1024 elements
     12}}}
     13
     14After
     15{{{
     16sage: g = posets.BooleanLattice(5).hasse_diagram().transitive_closure(); g = g.cartesian_product(g)
     17sage: %time Poset(g)
     18CPU times: user 292 ms, sys: 12 ms, total: 304 ms
     19Wall time: 265 ms
     20Finite poset containing 1024 elements
     21}}}
     22
     23Note that a LOT of time is lost on calls to `__eq__`. If I make no mistake it is because `Posets` are `UniqueRepresentation`. I would personally be very very glad if we could get rid of that.