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

feat(avm): relation microbenchmarks #11974

Merged
merged 2 commits into from
Feb 13, 2025
Merged

feat(avm): relation microbenchmarks #11974

merged 2 commits into from
Feb 13, 2025

Conversation

fcarreiro
Copy link
Contributor

Relation accumulation microbenchmarks

----------------------------------------------------------------------
Benchmark                            Time             CPU   Iterations
----------------------------------------------------------------------
alu_acc_random                   0.126 us        0.126 us      5542448
bc_decomposition_acc_random       4.32 us         4.32 us       161914
bc_retrieval_acc_random          0.024 us        0.024 us     28942571
bitwise_acc_random                1.42 us         1.42 us       493754
ecc_acc_random                    2.61 us         2.61 us       269299
execution_acc_random             0.527 us        0.527 us      1309267
instr_fetching_acc_random        0.024 us        0.024 us     29060773
range_check_acc_random            2.77 us         2.77 us       257953
sha256_acc_random                 6.33 us         6.33 us       111173

Copy link
Contributor Author

fcarreiro commented Feb 13, 2025

@fcarreiro fcarreiro changed the title feat(avm): unit benchmarks feat(avm): relation microbenchmarks Feb 13, 2025
@fcarreiro fcarreiro force-pushed the fc/avm-tracegen-assert branch from 454481d to 397730a Compare February 13, 2025 12:05
@fcarreiro fcarreiro requested a review from Maddiaa0 as a code owner February 13, 2025 12:05
{
bb::constexpr_for<0, std::tuple_size_v<typename AvmFlavor::MainRelations>, 1>([&]<size_t i>() {
using Relation = std::tuple_element_t<i, typename AvmFlavor::MainRelations>;
BENCHMARK(BM_accumulate_random<Relation>)
Copy link
Contributor

Choose a reason for hiding this comment

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

@fcarreiro I guess that get_random_row() and get_params() are accounted for in the timing measurement. Is this negligible? Otherwise, can we remove them from the measurement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I understood from the docs is that only things inside the for loop are accounted for :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting! Cool.

Copy link
Contributor Author

fcarreiro commented Feb 13, 2025

Merge activity

  • Feb 13, 7:36 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Feb 13, 7:38 AM EST: A user merged this pull request with Graphite.

@fcarreiro fcarreiro changed the base branch from fc/avm-tracegen-assert to graphite-base/11974 February 13, 2025 12:36
@fcarreiro fcarreiro changed the base branch from graphite-base/11974 to master February 13, 2025 12:36
@fcarreiro fcarreiro merged commit 95b581d into master Feb 13, 2025
28 checks passed
@fcarreiro fcarreiro deleted the fc/avm-unit-bench branch February 13, 2025 12:38
sklppy88 pushed a commit that referenced this pull request Feb 13, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.76.4</summary>

##
[0.76.4](aztec-package-v0.76.3...aztec-package-v0.76.4)
(2025-02-13)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.76.4</summary>

##
[0.76.4](barretenberg.js-v0.76.3...barretenberg.js-v0.76.4)
(2025-02-13)


### Miscellaneous

* Unify webpack dev server versions
([#11965](#11965))
([921d2cd](921d2cd))
</details>

<details><summary>aztec-packages: 0.76.4</summary>

##
[0.76.4](aztec-packages-v0.76.3...aztec-packages-v0.76.4)
(2025-02-13)


### Features

* `FunctionDefinition::as_typed_expr`
(noir-lang/noir#7358)
([5efdd57](5efdd57))
* Aes decryption oracle
([#11907](#11907))
([c4ce913](c4ce913))
* **avm:** Constrained ec_add
([#11525](#11525))
([f8fe602](f8fe602))
* **avm:** Interaction testing
([#11947](#11947))
([fc647eb](fc647eb))
* **avm:** Relation microbenchmarks
([#11974](#11974))
([95b581d](95b581d))
* **cli:** Add `--target-dir` option
(noir-lang/noir#7350)
([5efdd57](5efdd57))
* Indexed protocol contracts tree
([#11897](#11897))
([96e84d4](96e84d4))
* **performance:** Check sub operations against induction variables
(noir-lang/noir#7356)
([5efdd57](5efdd57))
* **performance:** Use unchecked ops based upon known induction
variables (noir-lang/noir#7344)
([5efdd57](5efdd57))
* Small blob fixes/improvements
([#11686](#11686))
([4eab9fc](4eab9fc))
* Update fee model
([#11953](#11953))
([2798d58](2798d58))
* Use brillig optimized sha256
([#11696](#11696))
([438c905](438c905))


### Bug Fixes

* Ci fixes
([#11973](#11973))
([6386f4e](6386f4e))
* **cli:** Only lock the packages selected in the workspace
(noir-lang/noir#7345)
([5efdd57](5efdd57))
* Deterministic generation of vkeys in ts
([#11951](#11951))
([7901cac](7901cac))
* Incorrect secondary file in LSP errors
(noir-lang/noir#7347)
([5efdd57](5efdd57))
* Lock git dependencies folder when resolving workspace
(noir-lang/noir#7327)
([5efdd57](5efdd57))
* Perform SSA constraints check on final SSA
(noir-lang/noir#7334)
([5efdd57](5efdd57))
* Remove deprecated artifacts
([#11979](#11979))
([4f0dce7](4f0dce7))
* Remove serial queue in broker facade
([#11956](#11956))
([3485b52](3485b52))
* **ssa:** Make the lookback feature opt-in
(noir-lang/noir#7190)
([5efdd57](5efdd57))


### Miscellaneous

* **avm:** Tracegen interactions assertion
([#11972](#11972))
([b865ccc](b865ccc))
* Avoid doing all brillig integer arithmetic on u128s
(noir-lang/noir#7357)
([5efdd57](5efdd57))
* Basic test for MSM in Noir to catch performance improvements and
regressions (noir-lang/noir#7341)
([5efdd57](5efdd57))
* Bump devnet boot node resources
([#11958](#11958))
([bbcdefc](bbcdefc))
* **ci:** Add Vecs and vecs to cspell
(noir-lang/noir#7342)
([5efdd57](5efdd57))
* Deprecate keccak256 (noir-lang/noir#7361)
([5efdd57](5efdd57))
* Fix warnings (noir-lang/noir#7330)
([5efdd57](5efdd57))
* Mark sha256 as deprecated from the stdlib
(noir-lang/noir#7351)
([5efdd57](5efdd57))
* Moving storage slot out of `NoteHeader`
([#11904](#11904))
([8c4bb1c](8c4bb1c))
* Normalize path displayed by `nargo new`
(noir-lang/noir#7328)
([5efdd57](5efdd57))
* Redo typo PR by osrm (noir-lang/noir#7238)
([5efdd57](5efdd57))
* Release Noir(1.0.0-beta.2)
(noir-lang/noir#6914)
([5efdd57](5efdd57))
* Remove foreign calls array from Brillig VM constructor
(noir-lang/noir#7337)
([5efdd57](5efdd57))
* Remove misleading output from `nargo check`
(noir-lang/noir#7329)
([5efdd57](5efdd57))
* Remove some unused types and functions in the AST
(noir-lang/noir#7339)
([5efdd57](5efdd57))
* Remove unnecessary constants
(noir-lang/noir#7326)
([5efdd57](5efdd57))
* Revive browser test before killing it
([#11964](#11964))
([cb47cc0](cb47cc0))
* Split acirgen into multiple modules
(noir-lang/noir#7310)
([5efdd57](5efdd57))
* Unify webpack dev server versions
([#11965](#11965))
([921d2cd](921d2cd))
</details>

<details><summary>barretenberg: 0.76.4</summary>

##
[0.76.4](barretenberg-v0.76.3...barretenberg-v0.76.4)
(2025-02-13)


### Features

* Aes decryption oracle
([#11907](#11907))
([c4ce913](c4ce913))
* **avm:** Constrained ec_add
([#11525](#11525))
([f8fe602](f8fe602))
* **avm:** Interaction testing
([#11947](#11947))
([fc647eb](fc647eb))
* **avm:** Relation microbenchmarks
([#11974](#11974))
([95b581d](95b581d))


### Miscellaneous

* **avm:** Tracegen interactions assertion
([#11972](#11972))
([b865ccc](b865ccc))
* Unify webpack dev server versions
([#11965](#11965))
([921d2cd](921d2cd))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Feb 14, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.76.4</summary>

##
[0.76.4](AztecProtocol/aztec-packages@aztec-package-v0.76.3...aztec-package-v0.76.4)
(2025-02-13)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.76.4</summary>

##
[0.76.4](AztecProtocol/aztec-packages@barretenberg.js-v0.76.3...barretenberg.js-v0.76.4)
(2025-02-13)


### Miscellaneous

* Unify webpack dev server versions
([#11965](AztecProtocol/aztec-packages#11965))
([921d2cd](AztecProtocol/aztec-packages@921d2cd))
</details>

<details><summary>aztec-packages: 0.76.4</summary>

##
[0.76.4](AztecProtocol/aztec-packages@aztec-packages-v0.76.3...aztec-packages-v0.76.4)
(2025-02-13)


### Features

* `FunctionDefinition::as_typed_expr`
(noir-lang/noir#7358)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Aes decryption oracle
([#11907](AztecProtocol/aztec-packages#11907))
([c4ce913](AztecProtocol/aztec-packages@c4ce913))
* **avm:** Constrained ec_add
([#11525](AztecProtocol/aztec-packages#11525))
([f8fe602](AztecProtocol/aztec-packages@f8fe602))
* **avm:** Interaction testing
([#11947](AztecProtocol/aztec-packages#11947))
([fc647eb](AztecProtocol/aztec-packages@fc647eb))
* **avm:** Relation microbenchmarks
([#11974](AztecProtocol/aztec-packages#11974))
([95b581d](AztecProtocol/aztec-packages@95b581d))
* **cli:** Add `--target-dir` option
(noir-lang/noir#7350)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Indexed protocol contracts tree
([#11897](AztecProtocol/aztec-packages#11897))
([96e84d4](AztecProtocol/aztec-packages@96e84d4))
* **performance:** Check sub operations against induction variables
(noir-lang/noir#7356)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* **performance:** Use unchecked ops based upon known induction
variables (noir-lang/noir#7344)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Small blob fixes/improvements
([#11686](AztecProtocol/aztec-packages#11686))
([4eab9fc](AztecProtocol/aztec-packages@4eab9fc))
* Update fee model
([#11953](AztecProtocol/aztec-packages#11953))
([2798d58](AztecProtocol/aztec-packages@2798d58))
* Use brillig optimized sha256
([#11696](AztecProtocol/aztec-packages#11696))
([438c905](AztecProtocol/aztec-packages@438c905))


### Bug Fixes

* Ci fixes
([#11973](AztecProtocol/aztec-packages#11973))
([6386f4e](AztecProtocol/aztec-packages@6386f4e))
* **cli:** Only lock the packages selected in the workspace
(noir-lang/noir#7345)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Deterministic generation of vkeys in ts
([#11951](AztecProtocol/aztec-packages#11951))
([7901cac](AztecProtocol/aztec-packages@7901cac))
* Incorrect secondary file in LSP errors
(noir-lang/noir#7347)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Lock git dependencies folder when resolving workspace
(noir-lang/noir#7327)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Perform SSA constraints check on final SSA
(noir-lang/noir#7334)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Remove deprecated artifacts
([#11979](AztecProtocol/aztec-packages#11979))
([4f0dce7](AztecProtocol/aztec-packages@4f0dce7))
* Remove serial queue in broker facade
([#11956](AztecProtocol/aztec-packages#11956))
([3485b52](AztecProtocol/aztec-packages@3485b52))
* **ssa:** Make the lookback feature opt-in
(noir-lang/noir#7190)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))


### Miscellaneous

* **avm:** Tracegen interactions assertion
([#11972](AztecProtocol/aztec-packages#11972))
([b865ccc](AztecProtocol/aztec-packages@b865ccc))
* Avoid doing all brillig integer arithmetic on u128s
(noir-lang/noir#7357)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Basic test for MSM in Noir to catch performance improvements and
regressions (noir-lang/noir#7341)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Bump devnet boot node resources
([#11958](AztecProtocol/aztec-packages#11958))
([bbcdefc](AztecProtocol/aztec-packages@bbcdefc))
* **ci:** Add Vecs and vecs to cspell
(noir-lang/noir#7342)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Deprecate keccak256 (noir-lang/noir#7361)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Fix warnings (noir-lang/noir#7330)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Mark sha256 as deprecated from the stdlib
(noir-lang/noir#7351)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Moving storage slot out of `NoteHeader`
([#11904](AztecProtocol/aztec-packages#11904))
([8c4bb1c](AztecProtocol/aztec-packages@8c4bb1c))
* Normalize path displayed by `nargo new`
(noir-lang/noir#7328)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Redo typo PR by osrm (noir-lang/noir#7238)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Release Noir(1.0.0-beta.2)
(noir-lang/noir#6914)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Remove foreign calls array from Brillig VM constructor
(noir-lang/noir#7337)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Remove misleading output from `nargo check`
(noir-lang/noir#7329)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Remove some unused types and functions in the AST
(noir-lang/noir#7339)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Remove unnecessary constants
(noir-lang/noir#7326)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Revive browser test before killing it
([#11964](AztecProtocol/aztec-packages#11964))
([cb47cc0](AztecProtocol/aztec-packages@cb47cc0))
* Split acirgen into multiple modules
(noir-lang/noir#7310)
([5efdd57](AztecProtocol/aztec-packages@5efdd57))
* Unify webpack dev server versions
([#11965](AztecProtocol/aztec-packages#11965))
([921d2cd](AztecProtocol/aztec-packages@921d2cd))
</details>

<details><summary>barretenberg: 0.76.4</summary>

##
[0.76.4](AztecProtocol/aztec-packages@barretenberg-v0.76.3...barretenberg-v0.76.4)
(2025-02-13)


### Features

* Aes decryption oracle
([#11907](AztecProtocol/aztec-packages#11907))
([c4ce913](AztecProtocol/aztec-packages@c4ce913))
* **avm:** Constrained ec_add
([#11525](AztecProtocol/aztec-packages#11525))
([f8fe602](AztecProtocol/aztec-packages@f8fe602))
* **avm:** Interaction testing
([#11947](AztecProtocol/aztec-packages#11947))
([fc647eb](AztecProtocol/aztec-packages@fc647eb))
* **avm:** Relation microbenchmarks
([#11974](AztecProtocol/aztec-packages#11974))
([95b581d](AztecProtocol/aztec-packages@95b581d))


### Miscellaneous

* **avm:** Tracegen interactions assertion
([#11972](AztecProtocol/aztec-packages#11972))
([b865ccc](AztecProtocol/aztec-packages@b865ccc))
* Unify webpack dev server versions
([#11965](AztecProtocol/aztec-packages#11965))
([921d2cd](AztecProtocol/aztec-packages@921d2cd))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

2 participants