Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-35358: Lighter construction of finite field elements from lists
### 📚 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. ### 📝 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: #35358 Reported by: Rémy Oudompheng Reviewer(s): Travis Scrimshaw
- Loading branch information