Skip to content
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

Multilinear extension evaluation speedup #603

Merged
merged 5 commits into from
Feb 15, 2023

Conversation

protoben
Copy link
Contributor

@protoben protoben commented Feb 15, 2023

Description

This change reduces the number of field multiplications performed in DenseMultilinearExtension::evaluate and SparseMultilinearExtension::evaluate (actually, in fix_variables and precompute_eq, respectively) by factoring.

This results in a speedup in the polynomial-evaluation benchmarks over master (28-37% and 23-27%, respectively, on my machine).


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
    • These changes are covered by the existing unit tests for evaluation (dense::tests::evaluate_at_a_point, sparse::tests::evaluate, and sparse::tests::evaluate_edge_cases).
  • Updated relevant documentation in the code
    • No relevant documentation in the code was present
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@protoben protoben requested review from a team as code owners February 15, 2023 06:57
@protoben protoben requested review from Pratyush, mmagician and weikengchen and removed request for a team February 15, 2023 06:57
@mmagician mmagician added this pull request to the merge queue Feb 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 15, 2023
@weikengchen weikengchen added this pull request to the merge queue Feb 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 15, 2023
@Pratyush Pratyush added this pull request to the merge queue Feb 15, 2023
Merged via the queue into arkworks-rs:master with commit 7c64b17 Feb 15, 2023
paberr pushed a commit to paberr/algebra that referenced this pull request Feb 22, 2023
* Reduce # multiplications in dense ml extension eval

* Reduce # multiplications in sparse ml extension eval

* Eliminate extra vector allocation in precompute_eq

* Add entry to changelog on mul reduction in eval functions
aleasims pushed a commit to NilFoundation/arkworks-algebra that referenced this pull request Oct 18, 2023
* Reduce # multiplications in dense ml extension eval

* Reduce # multiplications in sparse ml extension eval

* Eliminate extra vector allocation in precompute_eq

* Add entry to changelog on mul reduction in eval functions
aleasims added a commit to NilFoundation/arkworks-algebra that referenced this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants