Skip to content

feat: optimize brillig execution of split_X_bits functions#47

Merged
iAmMichaelConnor merged 3 commits intomainfrom
tf/abuse-casting-to-reduce-brillig-execution-trace
Nov 5, 2024
Merged

feat: optimize brillig execution of split_X_bits functions#47
iAmMichaelConnor merged 3 commits intomainfrom
tf/abuse-casting-to-reduce-brillig-execution-trace

Conversation

@TomAFrench
Copy link
Copy Markdown
Member

Description

Problem*

Resolves

Summary*

This PR reworks the split_120_bits and `split_60_bits functions to abuse the truncation we perform when casting to avoid the need to perform byte decompositions (and the massive blowup in execution trace that brings)

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Copy Markdown
Contributor

@vezenovm vezenovm left a comment

Choose a reason for hiding this comment

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

Some minor nits

Comment thread src/utils/split_bits.nr Outdated
Comment thread src/utils/split_bits.nr Outdated
Comment thread src/utils/split_bits.nr Outdated
Comment thread src/utils/split_bits.nr Outdated
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Copy link
Copy Markdown
Collaborator

@iAmMichaelConnor iAmMichaelConnor left a comment

Choose a reason for hiding this comment

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

Very neat!

@iAmMichaelConnor iAmMichaelConnor merged commit 31ebc7c into main Nov 5, 2024
@github-actions github-actions bot mentioned this pull request Nov 5, 2024
TomAFrench added a commit that referenced this pull request Nov 8, 2024
* main:
  feat: remove generic parameter from the `BigNum` trait (#44)
  fix: fix broken tests in `runtime_bignum_test.nr` (#39)
  feat: remove a bunch of unnecessary bytecode from unconstrained ops (#50)
  fix: Fix barrett reduction bug (#51)
  feat: optimize brillig execution of `split_X_bits` functions (#47)
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.

3 participants