Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29323: Set up cross polytope with both Vrep and Hrep (if backen…
…d supports it) 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. URL: https://trac.sagemath.org/29323 Reported by: gh-kliem Ticket author(s): Jonathan Kliem Reviewer(s): Frédéric Chapoton
- Loading branch information