-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
We set up the cross polytope with precomputed double description, if the backend supports it. Otherwise, the vertices will be used as before (the shorter input is selected automatically by #28880).
Before this ticket:
sage: %time P = polytopes.cross_polytope(8, backend='field')
CPU times: user 14.3 s, sys: 4.01 ms, total: 14.3 s
Wall time: 14.3 s
sage: %timeit P = polytopes.cross_polytope(13, backend='ppl')
1 loop, best of 5: 312 ms per loop
With this ticket:
sage: %time P = polytopes.hypercube(8, backend='field')
CPU times: user 29.8 ms, sys: 11.2 ms, total: 41 ms
Wall time: 40.3 ms
sage: %timeit P = polytopes.cross_polytope(13, backend='ppl')
1 loop, best of 5: 312 ms per loop
sage: %timeit P = polytopes.hypercube(13, backend='field')
10 loops, best of 5: 69.5 ms per loop
Note: This might slow down some backends (e.g. ppl
) a bit, as the inequalities are precomputed and then discarded again. However, this seems to be only minor. The speed up for backend field
is significant, as nothing is being computed anymore.
Component: geometry
Keywords: cross polytope, precomputed data
Author: Jonathan Kliem
Branch/Commit: a14d5a1
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/29323