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: avoid unnecessary memory allocation/deallocations in brillig VM #7108

Closed
wants to merge 2 commits into from

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Jan 17, 2025

Description

Problem*

Resolves

Summary*

I noticed that we're doing a lot of resizing of the underlying vec when writing to memory. Doing some experimenting.

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 changed the title feat: avoid unnecessary memory allocations in brillig VM feat: avoid unnecessary memory allocation/deallocations in brillig VM Jan 17, 2025
Copy link
Contributor

Compilation Report

Program Compilation Time %
sha256_regression 1.050s 5%
regression_4709 0.821s 1%
ram_blowup_regression 16.800s 5%
rollup-root 3.554s -2%
rollup-merge 2.034s -4%
rollup-block-root-single-tx 138.000s 0%
rollup-block-root-empty 2.050s -1%
rollup-block-root 138.000s 2%
rollup-block-merge 3.680s 4%
rollup-base-public 28.140s 1%
rollup-base-private 10.068s -1%
private-kernel-tail 0.971s -4%
private-kernel-reset 6.202s 2%
private-kernel-inner 2.194s -1%

Copy link
Contributor

Execution Report

Program Execution Time %
sha256_regression 0.051s -2%
regression_4709 0.001s 0%
ram_blowup_regression 0.600s -2%
rollup-root 0.104s 0%
rollup-merge 0.006s -15%
rollup-block-root 36.800s -1%
rollup-block-merge 0.104s 0%
rollup-base-public 1.225s -1%
rollup-base-private 0.449s -2%
private-kernel-tail 0.019s 0%
private-kernel-reset 0.311s 0%
private-kernel-inner 0.069s 1%

@TomAFrench TomAFrench closed this Jan 17, 2025
Copy link
Contributor

github-actions bot commented Jan 17, 2025

Compilation Memory Report

Program Peak Memory
keccak256 77.560
workspace 123.770
regression_4709 424.070
ram_blowup_regression 1460.000
rollup-root 601.170
rollup-merge 494.140
rollup-block-root-single-tx 16060.000
rollup-block-root-empty 488.320
rollup-block-merge 601.160
rollup-base-public 2380.000
rollup-base-private 996.420
private-kernel-tail 207.340
private-kernel-reset 584.400
private-kernel-inner 294.600

Copy link
Contributor

github-actions bot commented Jan 17, 2025

Execution Memory Report

Program Peak Memory
keccak256 74.630
workspace 123.460
regression_4709 424.070
ram_blowup_regression 512.570
rollup-root 498.200
rollup-merge 472.940
rollup-block-merge 498.210
rollup-base-public 734.090
rollup-base-private 996.420
private-kernel-tail 180.820
private-kernel-reset 245.440
private-kernel-inner 294.600

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.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Execution Memory'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: dae4f7c Previous: df71bde Ratio
regression_4709 424.07 MB 315.94 MB 1.34
rollup-base-private 996.42 MB 590.4 MB 1.69
private-kernel-inner 294.6 MB 208.84 MB 1.41

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

CC: @TomAFrench

@TomAFrench TomAFrench deleted the tf/brillig-vm-memory branch January 17, 2025 18:24
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.

1 participant