We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Let FM be a combinatorial free module currently creating elements using the basis is very slow because the family is recreated each time:
FM
sage: FM = CombinatorialFreeModule(QQ, ZZ) sage: %timeit [FM.basis()[i] for i in range(100)] 5 loops, best of 3: 44.4 ms per loop
Adding a cache to basis gives a large speedup
basis
sage: FM = CombinatorialFreeModule(QQ, ZZ) sage: %timeit [FM.basis()[i] for i in range(100)] 125 loops, best of 3: 3.45 ms per loop
The speedup will be even larger with Simon King optimization on cache_methods.
CC: @sagetrac-sage-combinat
Component: combinatorics
Keywords: FreeModules basis cache
Author: Florent Hivert
Reviewer: Nicolas M. Thiéry
Merged: sage-4.7.1.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/11402
The text was updated successfully, but these errors were encountered:
Attachment: trac_11402-free_module_basis_cache-fh.patch.gz
A pretty simple one, ready for review.
Sorry, something went wrong.
I had wanted to do that for a while. Thanks!
hivert
No branches or pull requests
Let
FM
be a combinatorial free module currently creating elements using the basis is very slow because the family is recreated each time:Adding a cache to
basis
gives a large speedupThe speedup will be even larger with Simon King optimization on cache_methods.
CC: @sagetrac-sage-combinat
Component: combinatorics
Keywords: FreeModules basis cache
Author: Florent Hivert
Reviewer: Nicolas M. Thiéry
Merged: sage-4.7.1.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/11402
The text was updated successfully, but these errors were encountered: