Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Conversation

@naure
Copy link

@naure naure commented Sep 28, 2023

This PR replaces a million field inversions by … one. Field inversions are costly (~400 multiplications).

The EVM circuit assignment does a field inversion per row for the "step height" logic. This is a small set of values which can be precomputed. This PR does it in the form of a preloaded cache.

There is the same issue with the IsZeroGadget but it is harder to fix. This PR at least avoids the inversions of the common value 0.

Copy link

@kunxian-xia kunxian-xia left a comment

Choose a reason for hiding this comment

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

LGTM!

@naure naure merged commit 09ede99 into develop Sep 29, 2023
@naure naure deleted the optim-invert branch September 29, 2023 06:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants