Commit
2 years ago
gh-35358: Lighter construction of finite field elements from lists ### :books: Description When doing intensive polynomial arithmetic with the NTL implementation the constructor with lists is called a large number of times and may spend a lot of time constructing the vector_space and FreeModuleElement objects. The very common call to vector_space(map=False) is optimized to be as cheap as possible using the already cached object. The common case of lists of length 0 and 1 is replaced by cheaper shortcuts. This improves performance when doing intensive polynomial computations over finite field extensions. ### :memo: Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. URL: https://github.com/sagemath/sage/pull/35358 Reported by: Rémy Oudompheng Reviewer(s): Travis Scrimshaw
Author
Release Manager
Loading