Skip to content

feat: use asm feature flag in arkworks#8792

Merged
TomAFrench merged 1 commit intomasterfrom
tf/use-arkworks-asm-flag
Jun 4, 2025
Merged

feat: use asm feature flag in arkworks#8792
TomAFrench merged 1 commit intomasterfrom
tf/use-arkworks-asm-flag

Conversation

@TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Jun 4, 2025

Description

Problem*

Resolves #4754

Summary*

This PR switches us over to using some of the optimized assembly implementations of arkworks logic for free performance.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

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

@TomAFrench TomAFrench added the bench-show Display benchmark results on PR label Jun 4, 2025
@TomAFrench TomAFrench closed this Jun 4, 2025
@TomAFrench TomAFrench reopened this Jun 4, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ACVM Benchmarks

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
purely_sequential_opcodes 249871 ns/iter (± 709) 254917 ns/iter (± 786) 0.98
perfectly_parallel_opcodes 219439 ns/iter (± 1287) 223548 ns/iter (± 4283) 0.98
perfectly_parallel_batch_inversion_opcodes 2810385 ns/iter (± 2668) 3573210 ns/iter (± 14213) 0.79

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Time

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
private-kernel-inner 2.368 s 2.35 s 1.01
private-kernel-reset 7.62 s 7.608 s 1.00
private-kernel-tail 1.058 s 1.064 s 0.99
rollup-base-private 15.18 s 16.12 s 0.94
rollup-base-public 13.7 s 13.38 s 1.02
rollup-block-root-empty 1.27 s 1.282 s 0.99
rollup-block-root-single-tx 123 s 126 s 0.98
rollup-block-root 121 s 124 s 0.98
rollup-merge 1.06 s 1.03 s 1.03
rollup-root 1.53 s 1.526 s 1.00
semaphore-depth-10 0.791 s 0.833 s 0.95

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Artifact Size

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
private-kernel-inner 1133 KB 1133 KB 1
private-kernel-reset 2064.4 KB 2064.4 KB 1
private-kernel-tail 588.8 KB 588.8 KB 1
rollup-base-private 4955.9 KB 4955.9 KB 1
rollup-base-public 3995.3 KB 3995.3 KB 1
rollup-block-root-empty 256.7 KB 256.7 KB 1
rollup-block-root-single-tx 25707.5 KB 25707.5 KB 1
rollup-block-root 25714.4 KB 25714.4 KB 1
rollup-merge 183.4 KB 183.4 KB 1
rollup-root 417.9 KB 417.9 KB 1
semaphore-depth-10 636.3 KB 636.3 KB 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Time

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
private-kernel-inner 0.027 s 0.028 s 0.96
private-kernel-reset 0.159 s 0.161 s 0.99
private-kernel-tail 0.011 s 0.011 s 1
rollup-base-private 0.287 s 0.303 s 0.95
rollup-base-public 0.188 s 0.19 s 0.99
rollup-block-root 11.3 s 11 s 1.03
rollup-merge 0.003 s 0.004 s 0.75
rollup-root 0.009 s 0.009 s 1
semaphore-depth-10 0.02 s 0.021 s 0.95

This comment was automatically generated by workflow using github-action-benchmark.

@TomAFrench TomAFrench requested a review from a team June 4, 2025 17:57
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Test Suite Duration

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
test_report_AztecProtocol_aztec-packages_noir-projects_aztec-nr 67 s 66 s 1.02
test_report_AztecProtocol_aztec-packages_noir-projects_noir-contracts 107 s 110 s 0.97
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 43 s 45 s 0.96
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_private-kernel-lib 205 s 209 s 0.98
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_rollup-lib 270 s 254 s 1.06
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_types 69 s 69 s 1
test_report_noir-lang_noir-bignum_ 376 s 381 s 0.99
test_report_noir-lang_noir_bigcurve_ 227 s 250 s 0.91
test_report_noir-lang_sha512_ 32 s 30 s 1.07
test_report_zkpassport_noir_rsa_ 3 s 3 s 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Memory

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
private-kernel-inner 202.02 MB 202.02 MB 1
private-kernel-reset 225.75 MB 225.75 MB 1
private-kernel-tail 177.16 MB 177.16 MB 1
rollup-base-private 489.94 MB 489.94 MB 1
rollup-base-public 423.45 MB 423.45 MB 1
rollup-block-root 1400 MB 1400 MB 1
rollup-merge 312.01 MB 312.01 MB 1
rollup-root 317.69 MB 317.69 MB 1
semaphore_depth_10 70.96 MB 70.96 MB 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Memory

Details
Benchmark suite Current: d145f4f Previous: 109b5f8 Ratio
private-kernel-inner 292.98 MB 292.98 MB 1
private-kernel-reset 533.91 MB 533.91 MB 1
private-kernel-tail 192.8 MB 192.8 MB 1
rollup-base-private 1380 MB 1380 MB 1
rollup-base-public 1540 MB 1540 MB 1
rollup-block-root-empty 342.95 MB 342.94 MB 1.00
rollup-block-root-single-tx 7830 MB 7830 MB 1
rollup-block-root 7830 MB 7830 MB 1
rollup-merge 327.16 MB 327.16 MB 1
rollup-root 381.47 MB 381.49 MB 1.00
semaphore_depth_10 106.4 MB 106.4 MB 1

This comment was automatically generated by workflow using github-action-benchmark.

@TomAFrench TomAFrench enabled auto-merge June 4, 2025 18:10
@TomAFrench TomAFrench disabled auto-merge June 4, 2025 18:11
@TomAFrench TomAFrench added this pull request to the merge queue Jun 4, 2025
Merged via the queue into master with commit 9d44ab7 Jun 4, 2025
170 of 199 checks passed
@TomAFrench TomAFrench deleted the tf/use-arkworks-asm-flag branch June 4, 2025 18:37
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 6, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: type unification tests, and try moving constants to the other side
(noir-lang/noir#8807)
fix!: disallow casting numeric to bool
(noir-lang/noir#8703)
fix: delay associated constants resolution
(noir-lang/noir#8744)
fix: right shift overflow to 0
(noir-lang/noir#8772)
fix: use value predicated by range checks
(noir-lang/noir#8778)
fix: unify infix expressions by isolating unbound type variables
(noir-lang/noir#8796)
feat: use `asm` feature flag in arkworks
(noir-lang/noir#8792)
chore: add a failing test for #8780
(noir-lang/noir#8785)
chore: Adjust the frequency of 'for' statements in ACIR fuzz generation
(noir-lang/noir#8788)
fix: Merge `replacement_type` and `is_function_type` in
`defunctionalization` (noir-lang/noir#8784)
chore(fuzz): Remove unreachable functions in the AST fuzzer
(noir-lang/noir#8782)
chore(docs): Copy attribute docs into versioned docs
(noir-lang/noir#8777)
fix(licm): Preserve semantic ordering of side-effectual instructions
when hoisting (noir-lang/noir#8724)
fix: Create SSA interpreter arguments from scratch for each invocation
(noir-lang/noir#8762)
chore: mark sha512 as non-critical
(noir-lang/noir#8776)
fix!: disallow specifying associated items via generics
(noir-lang/noir#8756)
fix: stop inserting instructions after break and continue
(noir-lang/noir#8712)
fix: Fix comptime casts of negative integer to field
(noir-lang/noir#8696)
chore(SSA): restrict `shr` and `shl` right-hand side to u8
(noir-lang/noir#8753)
chore: bump some JS packages
(noir-lang/noir#8771)
chore: document `allow(dead_code)` and reorganize attributes
(noir-lang/noir#8766)
fix: Add missing cases for finding function values in
`find_functions_as_values` (noir-lang/noir#8738)
fix: correct bitsize in signed division
(noir-lang/noir#8733)
chore: remove noir-lang/noir_rsa from external libraries
(noir-lang/noir#8752)
chore: bump external pinned commits
(noir-lang/noir#8747)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jul 16, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: type unification tests, and try moving constants to the other side
(noir-lang/noir#8807)
fix!: disallow casting numeric to bool
(noir-lang/noir#8703)
fix: delay associated constants resolution
(noir-lang/noir#8744)
fix: right shift overflow to 0
(noir-lang/noir#8772)
fix: use value predicated by range checks
(noir-lang/noir#8778)
fix: unify infix expressions by isolating unbound type variables
(noir-lang/noir#8796)
feat: use `asm` feature flag in arkworks
(noir-lang/noir#8792)
chore: add a failing test for AztecProtocol#8780
(noir-lang/noir#8785)
chore: Adjust the frequency of 'for' statements in ACIR fuzz generation
(noir-lang/noir#8788)
fix: Merge `replacement_type` and `is_function_type` in
`defunctionalization` (noir-lang/noir#8784)
chore(fuzz): Remove unreachable functions in the AST fuzzer
(noir-lang/noir#8782)
chore(docs): Copy attribute docs into versioned docs
(noir-lang/noir#8777)
fix(licm): Preserve semantic ordering of side-effectual instructions
when hoisting (noir-lang/noir#8724)
fix: Create SSA interpreter arguments from scratch for each invocation
(noir-lang/noir#8762)
chore: mark sha512 as non-critical
(noir-lang/noir#8776)
fix!: disallow specifying associated items via generics
(noir-lang/noir#8756)
fix: stop inserting instructions after break and continue
(noir-lang/noir#8712)
fix: Fix comptime casts of negative integer to field
(noir-lang/noir#8696)
chore(SSA): restrict `shr` and `shl` right-hand side to u8
(noir-lang/noir#8753)
chore: bump some JS packages
(noir-lang/noir#8771)
chore: document `allow(dead_code)` and reorganize attributes
(noir-lang/noir#8766)
fix: Add missing cases for finding function values in
`find_functions_as_values` (noir-lang/noir#8738)
fix: correct bitsize in signed division
(noir-lang/noir#8733)
chore: remove noir-lang/noir_rsa from external libraries
(noir-lang/noir#8752)
chore: bump external pinned commits
(noir-lang/noir#8747)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench-show Display benchmark results on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable feature flags for arkworks to make the Field operations faster

2 participants