Skip to content

Commit

Permalink
Merge fb2f947 into 63b3d02
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm authored Aug 19, 2024
2 parents 63b3d02 + fb2f947 commit bbe0b67
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/gates_report_brillig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,19 @@ jobs:
- name: Compare Brillig bytecode size reports
id: brillig_bytecode_diff
uses: noir-lang/noir-gates-diff@cd8721ebe0ad9a67889c601063cccc33a8ca7f32
uses: noir-lang/noir-gates-diff@3fb844067b25d1b59727ea600b614503b33503f4
with:
report: gates_report_brillig.json
header: |
# Changes to Brillig bytecode sizes
brillig_report: true
summaryQuantile: 0.9 # only display the 10% most significant bytecode size diffs in the summary (defaults to 20%)

- name: Add bytecode size diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: brillig
# delete the comment in case changes no longer impact brillig bytecode sizes
delete: ${{ !steps.brillig_bytecode_diff.outputs.markdown }}
message: ${{ steps.brillig_bytecode_diff.outputs.markdown }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "brillig_loop_size_regression"
type = "bin"
authors = [""]
compiler_version = ">=0.33.0"

[dependencies]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
struct EnumEmulation {
a: Option<Field>,
b: Option<Field>,
c: Option<Field>,
}

unconstrained fn main() -> pub Field {
let mut emulated_enum = EnumEmulation { a: Option::some(1), b: Option::none(), c: Option::none() };

for _ in 0..1 {
assert_eq(emulated_enum.a.unwrap(), 1);
}

emulated_enum.a = Option::some(2);
emulated_enum.a.unwrap()
}

0 comments on commit bbe0b67

Please sign in to comment.