#17408: Faster transitive_reduction (=> faster Poset creation)
---------------------------------+----------------------------
       Reporter:  ncohen         |        Owner:
           Type:  enhancement    |       Status:  needs_review
       Priority:  major          |    Milestone:  sage-6.5
      Component:  graph theory   |   Resolution:
       Keywords:                 |    Merged in:
        Authors:  Nathann Cohen  |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+----------------------------
Changes (by ncohen):

 * status:  new => needs_review


Old description:

> As reported on #17361, the call to `transitive_reduction` represents a
> non-negligible part of Poset creation.
>
> This branch re-implements it for acyclic graphs.

New description:

 As reported on #17361, the call to `transitive_reduction` represents a
 non-negligible part of Poset creation.

 This branch re-implements it for acyclic graphs.

 Before
 {{{
 sage: g = posets.BooleanLattice(5).hasse_diagram().transitive_closure(); g
 = g.cartesian_product(g)
 sage: %time Poset(g)
 CPU times: user 1.3 s, sys: 8 ms, total: 1.3 s
 Wall time: 1.29 s
 Finite poset containing 1024 elements
 }}}

 After
 {{{
 sage: g = posets.BooleanLattice(5).hasse_diagram().transitive_closure(); g
 = g.cartesian_product(g)
 sage: %time Poset(g)
 CPU times: user 292 ms, sys: 12 ms, total: 304 ms
 Wall time: 265 ms
 Finite poset containing 1024 elements
 }}}

 Note 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.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/17408#comment:1>
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.

Reply via email to