-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Great speedup in polytopes construction with generic backend #18241
Comments
Branch: u/vdelecroix/18241 |
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Vincent Delecroix |
comment:2
Attachment: polyhedron_test.py.gz |
This comment has been minimized.
This comment has been minimized.
comment:3
Could you say in the ticket's description what the branch does? Every single thing that you do without explanation, the reviewer has to figure out from the diff file. |
comment:4
Replying to @nathanncohen:
done! |
This comment has been minimized.
This comment has been minimized.
comment:5
Looks like your mutable object is also hashable
|
comment:6
Replying to @nathanncohen:
F!!!** Sage objects!
|
comment:7
Unless all SageObject must be immutable, I guess that it should be removed (in another ticket that will become another war) |
comment:8
Actually, no...
We should probably make |
comment:9
Replying to @nathanncohen:
Or
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
About this branch:
Nathann |
comment:13
Replying to @nathanncohen:
Nope. If you call the function with the same
Me neither. That's why I opened #18231. The function just constructs a matrix, why the name is badly chosen? You will get the very same answer as calling I do not understand you remark about the |
comment:14
Hello,
Oh, okay. Then change the cache's name please
Then should it be really fixed inside of this class? Or do we keep this code as it is and try to solve the #18231 instead.
Precisely because the name does not reflect the difference.
I hate this class already.
Oh. Well, because all that 'matrix' does is a if. If it is not a function of its own, you just have to copy this 'if' around. Nathann |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
Needs review again. |
comment:18
Yoooooooooooooo ! Looks good, almost good to go. Just two things:
Nathann |
comment:20
Hello, Replying to @nathanncohen:
Vincent |
comment:23
Okayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |
comment:24
Replying to @nathanncohen:
Great! Thanks. It becomes reasonable to start using the generic backend. Next step: avoid the recomputation of vertices! The algorithm is currently
And it is precisely step 2 which takes an infinite amount of time for the 600-cell! |
comment:25
reviewer name |
Reviewer: Nathann Cohen |
Changed branch from u/vdelecroix/18241 to |
Construction of polytopes with number field coordinates are very slow. There are several reasons for that:
NumberField.__cmp__
is slowVrep2Hrep
andHrep2Vrep
After applying the branch the speedup is really cool. Using polyhedron_test.py I got
Before
After
(But I am still not able to build the 600-cell)
Modifications with the branch:
In the double description file
itertools
instead of whateversage/combinat/*
base_ring.zero()
andbase_ring.one()
instead of the Python integer0
and1
. That prevents many coercions.add_inequality
so that the object is changed inplace instead of returning a new instance. I had to change the type of the attribute fromtuples
tolists
._matrix_space
and_matrix
.zero_set
(note that this was needed because the object is no more immutable,self.A
will grow inadd_inequality
)Start with a trivial case in
NumberField.__cmp__
.Depends on #18215
CC: @vbraun @nathanncohen
Component: geometry
Author: Vincent Delecroix
Branch/Commit:
c5b15bf
Reviewer: Nathann Cohen
Issue created by migration from https://trac.sagemath.org/ticket/18241
The text was updated successfully, but these errors were encountered: