-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Slow hnf for integer matrices #35161
Comments
Note this:
Something changes starting at dimension 27. |
Weird:
|
The hnf for integer dense matrices is quite slow, reported in sagemath#35161. While that issue is resolved, it doesn't make sense to keep this very slow test, so tune it down to an acceptable time.
Once this issue is fixed, consider reverting the commit in PR #35162. |
While this is certainly weird I don't think the code in this file is really used by Sage anymore (or at least I hope not!). Sage should be calling external libraries for the hnf, so speeding up Sage native code (which seems mostly historical) shouldn't be a priority vs ensuring that this code just isn't used. |
|
It looks like this logic is there do deal with weaknesses of old versions of flint (see #22970, #23026, flintlib/flint#335) and flint should be consistently faster now. @videlec, how hard would it be to dig up the benchmarks you ran back then? |
I have no idea where these are (ie on which computer). If I dig it, I would like such benchmarks to be part of regression testing :-) |
The hnf for integer dense matrices is quite slow, reported in #35161. While that issue is resolved, it doesn't make sense to keep this very slow test, so tune it down to an acceptable time. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> URL: #35162 Reported by: Gonzalo Tornaría Reviewer(s): Alex J Best
Is there an existing issue for this?
Did you read the documentation and troubleshoot guide?
Environment
Steps To Reproduce
Expected Behavior
hnf is fast
Actual Behavior
hnf is slow
Additional Information
Compare with
This is taken verbatim from the doctest of
sage.matrix.matrix_integer_dense_hnf.benchmark_hnf
which thus takes 20+ seconds (on a fast box) which is too long even for "long time" IMO. I'm not sure what this doctest is actually testing here. I want to believe that this used to be much faster, if so this is a speed regression.I'll make a PR to change the doctest so it doesn't take that much time, while keeping this issue open so the speed regression is not lost.
The text was updated successfully, but these errors were encountered: