-
-
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
speed up integral point enumeration #18029
Comments
This comment has been minimized.
This comment has been minimized.
comment:4
I was able to get ~15% speedup:
In the current version, this takes ~14s. There is also some improvement for the simplex approach:
vs
I used all the tricks that I know to squeeze speed out with doing any rewrites. However, it would be better to implement/use a priority queue (or linked list) data structure instead of a straight list for the inequalities since we are often moving one to the front as part of the algorithm. New commits:
|
Author: Travis Scrimshaw |
Commit: |
normaliz input |
comment:6
Attachment: 18029-example.in.gz This looks fine, but let me point out that the performance of this code is very far from the state of the art. |
comment:7
That said, of course it's nice to have a basic, generic implementation in Sage if one does not want to install normaliz; but it turns out that the implementation is actually not very generic (#21037). |
comment:9
FYI - this merged cleanly with #21037. |
Reviewer: Matthias Koeppe |
comment:10
Looks good. So... how about that normaliz interface? |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:12
Replying to @mkoeppe:
Sorry, I found one other place where I got another
That's quite a difference, and it would be great to have it available (and be extremely useful to me to have integral points that fast). I don't know how much I could help it writing the interface; I know somewhat how to write the cython bindings, but not what to use/expose from noraliz. I will definitely be happy to review it. |
comment:13
Just in case you didn't see it, could you check my last push? |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:21
I've added the Cython directives (I didn't know about them, thank you), and I've added a few more type declarations. I believe I have made it so once the type is known, it is kept that way so Cython should never have to recheck the type of things. |
comment:22
I've also added the |
Changed reviewer from Matthias Koeppe to Matthias Koeppe, Jeroen Demeyer |
comment:24
It builds and works OK. |
comment:25
Jeroen, if you have a minute, could you check my most recent changes? Thanks. |
comment:26
Ping? |
comment:28
#20885 now has an implementation of |
comment:29
This ticket would need rebasing also. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:31
Rebased. It would be nice to finalize this and get this in until #20885 gets merged and becomes the default. |
comment:32
By the way, I noticed the following bug in Sage (without this branch -- haven't tested yet with this branch!):
(I can make this a separate ticket if that's better.) New commits:
|
comment:33
(same error also with this branch). |
comment:34
I think that should be a separate ticket. (It likely might just be changing some |
comment:35
That's now #21993. |
comment:36
Looks good to me. |
Changed branch from public/geometry/speedup_integral_points-18029 to |
Some of the cython code in
sage/geometry/integral_points.pyx
can be optimized a lot (properly defining the types of objects, use theset_unsafe
feature from #17562) and more.Depends on #17562
CC: @novoselt @tscrim @w-bruns
Component: geometry
Author: Travis Scrimshaw
Branch/Commit:
83d3322
Reviewer: Matthias Koeppe, Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/18029
The text was updated successfully, but these errors were encountered: