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 meet() for lattice #21109
Comments
Branch: u/jmantysalo/faster-meet |
Commit: |
New commits:
|
comment:3
I have some questions: I do not understand the comment Does lc stands for "lower covers" ? if yes, that would be worth to say in a comment Could you take the opportunity to make the method fully pep8 compliant ? only the line
must be changed to
|
comment:4
Have you run tests on smaller and larger lattices? Does the about 2x speedup still hold in those cases? |
Changed keywords from latticeposet to lattice poset |
comment:5
If you haven't, just let me know, and I can run the tests. |
This comment has been minimized.
This comment has been minimized.
comment:7
Replying to @tscrim:
It is very hard to think an example where my code would be slower. This references to a python dict, whereas current code references to a matrix; referencing to matrix elements in a loop is slow. And that matrix must be precomputed first. You can test what happens if you compute le-matrix first (assuming that the user has, say, computed Möbius function matrix), but there will still be speedup. I added another example to description. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Replying to @fchapoton:
Changed. Then there is the error message formatting question... Python exceptions start with lowercase and do not end to a period. But this has been discussed in sage-devel without clear conclusion.
I guess it has meant covering. I removed it.
Done. |
comment:10
rc0 is out. |
Reviewer: Frédéric Chapoton |
comment:11
ok, looks good enough. Thanks |
Changed branch from u/jmantysalo/faster-meet to |
This trivial patch will speed up computation of meet matrix in lattices. Before:
After:
And for small lattices:
Without this patch it took 5.46 seconds, after the patch 1.54 seconds.
CC: @fchapoton
Component: combinatorics
Keywords: lattice poset
Author: Jori Mäntysalo
Branch/Commit:
965b8ab
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/21109
The text was updated successfully, but these errors were encountered: