-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Make mod_int signed and speed up matrix_modn_dense_float #14627
Comments
This comment has been minimized.
This comment has been minimized.
Attachment: test_matrix_modn_float.py.gz Performance test script |
Dependencies: #12728 |
This comment has been minimized.
This comment has been minimized.
Author: Volker Braun |
comment:5
Patch looks good, a few small comments/questions:
|
comment:6
I'm just following http://wiki.cython.org/FAQ#Whatisthedifferencebetweena.pxdand.pxifile.3FWhenshouldeitherbeused.3F, pxd for class declarations and pxi for include headers. The |
comment:7
I changed "assumes unsigned" -> "assumes signed", which is of course the whole point of the patch ;-) |
comment:8
re: pxi vs. pxd: They are concluding with "Now that "cimport *" can be used, there is no reason to use .pxi files for external declarations." I think it would be better to use a .pxd which seems to be best practice as recommended by the Cython devs. But I am not insisting on it. In other news: all tests passed. |
Attachment: trac_14627_signed_mod_int.patch.gz Updated patch |
This comment has been minimized.
This comment has been minimized.
comment:9
Ok, sounds good. New patch uses |
Reviewer: Martin Albrecht |
comment:10
|
comment:15
There are warnings
which aren't caused by this ticket, but might as well be fixed: the
|
Updated patch |
comment:16
Attachment: trac_14627_32bit.patch.gz I've fixed the 32-bit error, added documentation, and also fixed Jeroen's |
comment:17
The second patch needs review only |
This comment has been minimized.
This comment has been minimized.
comment:18
The changes look good. I don't have a 32-bit machine here to test, but other than that, I'd say it's good to go. Volker, you tested it on a 32-bit system, I presume? |
comment:19
Yes, of course I tested it on a 32-bit machine |
Attachment: trac_14627_more_primes.patch.gz Initial patch |
comment:21
I noticed that #10281 intentionally uses 64-bit integers on all platforms for |
This comment has been minimized.
This comment has been minimized.
comment:23
|
comment:24
Looks good to me |
Merged: sage-5.12.beta0 |
comment:27
Could the changes in that ticket be the cause of #15220? |
As discussed on https://groups.google.com/d/msg/sage-devel/hnO8gT8VON4/YyZ5UCM5wUEJ, unsigned longs are much slower than signed longs when converted to a Python object.
Without patch about 20x slower than naive list-of-list implementation:
With patch no performance difference:
Also, I collected some common extern cdef statements in pxd headers and cleaned up the
MAX_MODULUS
declarations.Apply
Depends on #12728
CC: @sagetrac-Stefan
Component: linear algebra
Author: Volker Braun
Reviewer: Martin Albrecht
Merged: sage-5.12.beta0
Issue created by migration from https://trac.sagemath.org/ticket/14627
The text was updated successfully, but these errors were encountered: