#20110: Speed up Polyhedron_base.graph()
-------------------------------------+-------------------------------------
Reporter: jplitza | Owner:
Type: enhancement | Status: new
Priority: trivial | Milestone: sage-7.1
Component: geometry | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | u/jplitza/polyhedron_graph
0a2602fcba8d18b204dbcd23f8a106f9bc63d55d| Dependencies:
Stopgaps: |
-------------------------------------+-------------------------------------
Currently, `Polyhedron_base.graph()` intersects with the base set of all
vertices in every of the ''n'' over 2 loop iterations in line 3321, where
''n'' is the number of vertices. This is useless as far as I can see,
because the sets that are being intersected cannot possibly ever contain
something that is not a vertex.
Leaving out this additional intersection speeds up the process of
constructing the graph significantly. I tested it on a 4 GHz machine for
the polyhedron `polytopes.associahedron(['E', 7])`, and with my patch it
only took close to two minutes instead of 5:15. Other examples like
`polytopes.associahedron(['E', 8])` also suggest a ''significant''
speedup, although I don't have precise measurements from the same machine.
I also tested that the resulting graph is actually the same for some
polyhedra.
--
Ticket URL: <http://trac.sagemath.org/ticket/20110>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.