Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up cross polytope with both Vrep and Hrep (if backend supports it) #29323

Closed
kliem opened this issue Mar 13, 2020 · 9 comments
Closed

Set up cross polytope with both Vrep and Hrep (if backend supports it) #29323

kliem opened this issue Mar 13, 2020 · 9 comments

Comments

@kliem
Copy link
Contributor

kliem commented Mar 13, 2020

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.

CC: @jplab @LaisRast

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

@kliem kliem added this to the sage-9.1 milestone Mar 13, 2020
@kliem
Copy link
Contributor Author

kliem commented Mar 13, 2020

Commit: dd291b5

@kliem
Copy link
Contributor Author

kliem commented Mar 13, 2020

New commits:

dd291b5set up cross polytope with precomputed data if backend supports it

@kliem
Copy link
Contributor Author

kliem commented Mar 13, 2020

Branch: public/29323

@kliem
Copy link
Contributor Author

kliem commented Mar 19, 2020

Changed branch from public/29323 to public/29323-reb

@kliem
Copy link
Contributor Author

kliem commented Mar 19, 2020

Changed commit from dd291b5 to a14d5a1

@kliem
Copy link
Contributor Author

kliem commented Mar 19, 2020

New commits:

862d44fset up cross polytope with precomputed data if backend supports it
a14d5a1fixed failing doctests

@fchapoton
Copy link
Contributor

comment:3

ok

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Mar 25, 2020

Changed branch from public/29323-reb to a14d5a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants