Skip to content

chore: Migrate read only methods to immutable references#265

Merged
vezenovm merged 6 commits intomainfrom
mv/imm-refs
Apr 13, 2026
Merged

chore: Migrate read only methods to immutable references#265
vezenovm merged 6 commits intomainfrom
mv/imm-refs

Conversation

@vezenovm
Copy link
Copy Markdown
Contributor

@vezenovm vezenovm commented Apr 8, 2026

Description

Problem*

Should assist in the compiler in preventing unnecessary clones

Summary*

Use immutable methods wherever applicable.

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

@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 'Brillig Bytecode Size'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.01.

Benchmark suite Current: 5d1a20e Previous: 00d4360 Ratio
assert_is_not_equal_BLS12_377Fq_Bench 116 opcodes 110 opcodes 1.05
assert_is_not_equal_BLS12_377Fr_Bench 103 opcodes 97 opcodes 1.06
assert_is_not_equal_BLS12_381Fq_Bench 116 opcodes 110 opcodes 1.05
assert_is_not_equal_BLS12_381Fr_Bench 103 opcodes 97 opcodes 1.06
assert_is_not_equal_BN254_Fq_Bench 103 opcodes 97 opcodes 1.06
assert_is_not_equal_U2048_Bench 198 opcodes 192 opcodes 1.03
assert_is_not_equal_U256_Bench 105 opcodes 99 opcodes 1.06
assert_is_not_zero_BLS12_377Fq_Bench 78 opcodes 75 opcodes 1.04
assert_is_not_zero_BLS12_377Fr_Bench 71 opcodes 68 opcodes 1.04
assert_is_not_zero_BLS12_381Fq_Bench 78 opcodes 75 opcodes 1.04
assert_is_not_zero_BLS12_381Fr_Bench 71 opcodes 68 opcodes 1.04
assert_is_not_zero_BN254_Fq_Bench 71 opcodes 68 opcodes 1.04
assert_is_not_zero_U2048_Bench 178 opcodes 175 opcodes 1.02
assert_is_not_zero_U256_Bench 73 opcodes 70 opcodes 1.04
assert_is_not_zero_integer_BLS12_377Fq_Bench 69 opcodes 66 opcodes 1.05
assert_is_not_zero_integer_BLS12_377Fr_Bench 63 opcodes 60 opcodes 1.05
assert_is_not_zero_integer_BLS12_381Fq_Bench 69 opcodes 66 opcodes 1.05
assert_is_not_zero_integer_BLS12_381Fr_Bench 63 opcodes 60 opcodes 1.05
assert_is_not_zero_integer_BN254_Fq_Bench 63 opcodes 60 opcodes 1.05
assert_is_not_zero_integer_U2048_Bench 153 opcodes 150 opcodes 1.02
assert_is_not_zero_integer_U256_Bench 63 opcodes 60 opcodes 1.05
cmp_BLS12_377Fq_Bench 291 opcodes 285 opcodes 1.02
cmp_BLS12_377Fr_Bench 251 opcodes 245 opcodes 1.02
cmp_BLS12_381Fq_Bench 291 opcodes 285 opcodes 1.02
cmp_BLS12_381Fr_Bench 251 opcodes 245 opcodes 1.02
cmp_BN254_Fq_Bench 251 opcodes 245 opcodes 1.02
cmp_U256_Bench 251 opcodes 245 opcodes 1.02
is_zero_BLS12_377Fq_Bench 80 opcodes 77 opcodes 1.04
is_zero_BLS12_377Fr_Bench 71 opcodes 68 opcodes 1.04
is_zero_BLS12_381Fq_Bench 80 opcodes 77 opcodes 1.04
is_zero_BLS12_381Fr_Bench 71 opcodes 68 opcodes 1.04
is_zero_BN254_Fq_Bench 71 opcodes 68 opcodes 1.04
is_zero_U2048_Bench 190 opcodes 187 opcodes 1.02
is_zero_U256_Bench 70 opcodes 67 opcodes 1.04
is_zero_integer_BLS12_377Fq_Bench 64 opcodes 61 opcodes 1.05
is_zero_integer_BLS12_377Fr_Bench 58 opcodes 55 opcodes 1.05
is_zero_integer_BLS12_381Fq_Bench 64 opcodes 61 opcodes 1.05
is_zero_integer_BLS12_381Fr_Bench 58 opcodes 55 opcodes 1.05
is_zero_integer_BN254_Fq_Bench 58 opcodes 55 opcodes 1.05
is_zero_integer_U2048_Bench 148 opcodes 145 opcodes 1.02
is_zero_integer_U256_Bench 58 opcodes 55 opcodes 1.05
sqrt_U2048_Bench 64 opcodes 61 opcodes 1.05
sqrt_U256_Bench 49 opcodes 46 opcodes 1.07
to_be_bytes_BLS12_377Fq_Bench 251 opcodes 248 opcodes 1.01
to_be_bytes_BLS12_377Fr_Bench 201 opcodes 198 opcodes 1.02
to_be_bytes_BLS12_381Fq_Bench 251 opcodes 248 opcodes 1.01
to_be_bytes_BLS12_381Fr_Bench 201 opcodes 198 opcodes 1.02
to_be_bytes_BN254_Fq_Bench 201 opcodes 198 opcodes 1.02
to_be_bytes_U2048_Bench 201 opcodes 198 opcodes 1.02
to_be_bytes_U256_Bench 209 opcodes 206 opcodes 1.01
to_le_bytes_BLS12_377Fq_Bench 294 opcodes 291 opcodes 1.01
to_le_bytes_BLS12_377Fr_Bench 244 opcodes 241 opcodes 1.01
to_le_bytes_BLS12_381Fq_Bench 294 opcodes 291 opcodes 1.01
to_le_bytes_BLS12_381Fr_Bench 244 opcodes 241 opcodes 1.01
to_le_bytes_BN254_Fq_Bench 244 opcodes 241 opcodes 1.01
to_le_bytes_U2048_Bench 241 opcodes 238 opcodes 1.01
to_le_bytes_U256_Bench 252 opcodes 249 opcodes 1.01
validate_in_range_BLS12_377Fq_Bench 80 opcodes 77 opcodes 1.04
validate_in_range_BLS12_377Fr_Bench 70 opcodes 67 opcodes 1.04
validate_in_range_BLS12_381Fq_Bench 80 opcodes 77 opcodes 1.04
validate_in_range_BLS12_381Fr_Bench 70 opcodes 67 opcodes 1.04
validate_in_range_BN254_Fq_Bench 70 opcodes 67 opcodes 1.04
validate_in_range_U2048_Bench 220 opcodes 217 opcodes 1.01
validate_in_range_U256_Bench 70 opcodes 67 opcodes 1.04

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

Copy link
Copy Markdown
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Execution reports from #268 look good

@vezenovm vezenovm merged commit cc86002 into main Apr 13, 2026
7 checks passed
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