-
-
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
Universal Cyclotomic Field implementation using libgap #18152
Comments
This comment has been minimized.
This comment has been minimized.
Dependencies: #18153 |
Branch: u/vdelecroix/18152 |
Commit: |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
Now all test pass! |
Branch pushed to git repo; I updated commit sha1. New commits:
|
A test file to compare timings |
comment:10
Attachment: ucf_test.py.gz I did some concrete timings and the conclusion is that in all cases the new implementation is faster by a factor of at least x8 (and it can be up to x20). |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
Hi! Did you have a look at #16116? Does it improve also the multiplication of generic cyclotomic matrices? Jean-Philippe |
comment:15
Hello Jean-Philippe, Replying to @jplab:
I guess so. Should be ten times faster. But I copied-pasted the GAP documentation in the top of the file:
Best, |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:38
All right. Updated on the very last 6.7.beta2! |
comment:39
Replying to @videlec:
IMO, we should keep both with the default being the dense. |
comment:40
Replying to @tscrim:
I was implictely requiring arguments. We will not keep it just because you think it has to ;-) I do have arguments for both sides, but as I am the ticket author I better not participate. |
comment:41
The main argument I could see for keeping the code around is as follow: The speed balance may evolve in the future, typically if free modules in Sage get optimized, or if new use cases emerge. Of course we could always revive the code then, but it would probably have rotten in the mean time, and we may have completely forgotten about it. It also can be used for testing purposes for comparing two independent implementations of UCF. Those are not super strong arguments. The main argument for not keeping it is that we would not want is wasting time maintaining it. A sensible approach might be to write a brief comment at the beginning of the file / class stating something like: "at this point this code is not used much (see ...). If maintaining it becomes a bother in the future, it's ok to discard it". |
comment:42
Perhaps one could add a comment/warning in the beginning of the file also to mention that GAP uses a dense representation and a link to the current ticket. If there is a use case popping up in the future we could revive the code as Nicolas mentioned.
Also: I just updated to 6.7.beta3 on my computer and pulled the ticket. There was a small conflict in the file src/doc/en/reference/rings_standard/index.rst Should I push the resolution of the conflict here? |
comment:43
Replying to @jplab:
Yes please. |
Changed branch from u/vdelecroix/18152 to u/jipilab/18152 |
comment:45
Et voilà! New commits:
|
comment:46
Hi, All test passed on 6.7.beta3! Could you add a comment/warning at the beginning of the file mentioning the old implementation and a link to the ticket? Perhaps it would be good to mention this in the documentation as well? |
Changed branch from u/jipilab/18152 to u/vdelecroix/18152 |
comment:48
Hi, This looks good to go as I see it. I set it to positive review. |
Changed branch from u/vdelecroix/18152 to |
Sage ships an implementation of the Universal Cyclotomic Field (in
sage.rings.universal_cyclotomic_field.*
) that is slower and less reliable than what is in gap. We propose in this ticket an implementation based on libgap.It fixes some issues about the old implementation:
And is about 10x faster (see comment:10) except for operations on very sparse elements with very large conductors (see e.g. comment:23, comment:27 and comment:28).
Possible follow up:
Depends on #18153
CC: @nthiery @stumpc5 @tscrim @vbraun
Component: number fields
Author: Vincent Delecroix
Branch/Commit:
b818c83
Reviewer: Jean-Philippe Labbé
Issue created by migration from https://trac.sagemath.org/ticket/18152
The text was updated successfully, but these errors were encountered: