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
faster hash of number field elements #23402
Comments
Author: Vincent Delecroix |
Commit: |
This comment has been minimized.
This comment has been minimized.
Branch: u/vdelecroix/23402 |
Dependencies: #23388 |
This comment has been minimized.
This comment has been minimized.
comment:3
Where did the two magic numbers come from? Also, why is one is hex and the other in decimal? |
comment:4
These "magic numbers" are just used to randomize the bits and can be obtained via
The I can actually be more coherent and use the same value in both places. |
comment:5
... bad idea (got stupid collisions) |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:7
More coherent version in
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:9
Okay, thanks. LGTM. |
Reviewer: Travis Scrimshaw |
comment:10
Changing the hash is changing the order of display in sets... some doctests break. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
Indeed... 3 collisions in 32 bits! Probabilistically, we should not see any collision before a sample of size 216 = sqrt(232). |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:19
needs review (no collision on the 18 first bits which is more than enough for 32 bits) |
comment:20
Doctest order failures due to the new hash. See patchbot report. |
comment:22
(rebased with a new commit to fix the doctests) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:24
The second doctest change in |
comment:25
@bhutz: Ben can you have a look at the doctest change in sage: S3 = MatrixGroup(SymmetricGroup(3))
sage: chi = S3.character(S3.character_table()[0])
sage: S3.invariants_of_degree(5, chi=chi)
- [x*y + (2*izeta3^3 + 3*izeta3^2 + 8*izeta3 + 3)*x*z + (-2*izeta3^3 -
- 3*izeta3^2 - 8*izeta3 - 4)*y*z,
- x^2 + (-2*izeta3^3 - 3*izeta3^2 - 8*izeta3 - 4)*y^2 + (2*izeta3^3 +
- 3*izeta3^2 + 8*izeta3 + 3)*z^2]
+ [x0^4*x1 - x0*x1^4 - x0^4*x2 + x1^4*x2 + x0*x2^4 - x1*x2^4,
+ x0^3*x1^2 - x0^2*x1^3 - x0^3*x2^2 + x1^3*x2^2 + x0^2*x2^3 - x1^2*x2^3] |
Changed keywords from none to days88, IMA coding sprints |
comment:28
Thanks. LGTM. |
Changed branch from u/vdelecroix/23402 to |
Hashing of nf element go through
self.polynomial()
which is damn slow!The attached branch provides a quick hash version (that is more robust than the one for polynomial). A x10 speed up is seen on the following example (425 ms vs 40ms)
Depends on #23388
CC: @bhutz
Component: number fields
Keywords: days88, IMA coding sprints
Author: Vincent Delecroix
Branch/Commit:
8d8a2ea
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/23402
The text was updated successfully, but these errors were encountered: