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

perf: compute twiddle cache just once per degree #534

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

chokobole
Copy link
Contributor

@chokobole chokobole commented Sep 5, 2024

Description

This PR optimizes Radix2EvaluationDomain by introducing TwiddleCache<F>.

This has 2 benefits:

  • Eliminating Vector Copying: When creating a coset using GetCoset(), the vectors are no longer copied.
  • Optimized TwoAdicMultiplicativeCoset Creation: A new domain is still created in TwoAdicMultiplicativeCoset even when the domain size remains the same. Additionally, the post-creation copying of vectors has been removed
  TwoAdicMultiplicativeCoset(uint32_t log_n, F shift) {
    domain_.reset(static_cast<math::Radix2EvaluationDomain<F>*>(
        math::Radix2EvaluationDomain<F>::Create(size_t{1} << log_n)
            ->GetCoset(shift)
            .release()));
  }

I pushed a commit with the same branch name of #530 by chance, I couldn't reopen it..

@chokobole chokobole force-pushed the perf/compute-twiddle-cache-just-once-per-degree branch from 4259e0e to 23ca7da Compare September 5, 2024 07:51
Copy link
Contributor

@fakedev9999 fakedev9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@batzor batzor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@GideokKim GideokKim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ashjeong ashjeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dongchangYoo dongchangYoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chokobole chokobole merged commit b5f00bc into main Sep 6, 2024
7 checks passed
@chokobole chokobole deleted the perf/compute-twiddle-cache-just-once-per-degree branch September 6, 2024 08:44
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.

6 participants