Skip to content

chore(ACIR): try to use constant expressions in memory ops#10068

Closed
asterite wants to merge 5 commits intomasterfrom
ab/acir-inline-mem-operations
Closed

chore(ACIR): try to use constant expressions in memory ops#10068
asterite wants to merge 5 commits intomasterfrom
ab/acir-inline-mem-operations

Conversation

@asterite
Copy link
Collaborator

@asterite asterite commented Oct 2, 2025

Description

Problem

No issue, just trying to simplify the generated ACIR so it's easier to understand.

Summary

I'm actually not sure this is a valid change. However, all tests pass for me locally. I think it does lead to shorter ACIR, especially for slice operations.

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.

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 Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 3b9ed50 Previous: 2e78193 Ratio
semaphore-depth-10 0.051 s 0.042 s 1.21

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

CC: @TomAFrench

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 'ACVM Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 2401086 Previous: dc79733 Ratio
perfectly_parallel_batch_inversion_opcodes 2779293 ns/iter (± 3670) 2257462 ns/iter (± 6119) 1.23

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

CC: @TomAFrench

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 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 2401086 Previous: dc79733 Ratio
private-kernel-reset 9.55 s 7.544 s 1.27

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

CC: @TomAFrench

@asterite
Copy link
Collaborator Author

asterite commented Oct 2, 2025

Hmm... "Reports / Circuit sizes" always fails so there must be something wrong in this PR..

@vezenovm
Copy link
Contributor

vezenovm commented Oct 2, 2025

Hmm... "Reports / Circuit sizes" always fails so there must be something wrong in this PR..

It is most likely failing when we try to serialize to barretenberg. You will have to re-run locally to see which tests are breaking. Although it is surprising to me that just using constants would fail as a similar experiment was done in #9970 (comment) and I was able to call into the backend.

@asterite
Copy link
Collaborator Author

I finally managed to install bb (the previous days the download file was giving 404) and I see it segfaults when running bb on the array_dynamic program. So maybe it is some serialization issue.

Given that this is just cosmetic, I'll close this PR.

@asterite asterite closed this Oct 16, 2025
@asterite asterite deleted the ab/acir-inline-mem-operations branch October 16, 2025 12:36
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