Skip to content

chore: update quicksort from iterative noir_sort version#7348

Merged
michaeljklein merged 24 commits intomasterfrom
michaeljklein/iterative-quicksort
Apr 30, 2025
Merged

chore: update quicksort from iterative noir_sort version#7348
michaeljklein merged 24 commits intomasterfrom
michaeljklein/iterative-quicksort

Conversation

@michaeljklein
Copy link
Contributor

Description

Problem*

Resolves #7213

Summary*

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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2025

Changes to Brillig bytecode sizes

Generated at commit: 63eb3cd44af98aae161a628420f981b344b8834f, compared to commit: 4bc636a3f6b01c439333382980c2e4b7a4eb47e6

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
array_sort_inliner_max +157 ❌ +60.15%
array_sort_inliner_zero +157 ❌ +60.15%

Full diff report 👇
Program Brillig opcodes (+/-) %
array_sort_inliner_max 418 (+157) +60.15%
array_sort_inliner_zero 418 (+157) +60.15%
array_sort_inliner_min 485 (+167) +52.52%
uhashmap_inliner_max 11,581 (+905) +8.48%
hashmap_inliner_max 17,290 (+960) +5.88%
uhashmap_inliner_min 7,562 (+183) +2.48%
uhashmap_inliner_zero 6,881 (+165) +2.46%
hashmap_inliner_zero 7,829 (+165) +2.15%
hashmap_inliner_min 8,842 (+183) +2.11%

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2025

Changes to number of Brillig opcodes executed

Generated at commit: 63eb3cd44af98aae161a628420f981b344b8834f, compared to commit: 4bc636a3f6b01c439333382980c2e4b7a4eb47e6

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
array_sort_inliner_max +425 ❌ +90.43%
array_sort_inliner_zero +425 ❌ +90.43%

Full diff report 👇
Program Brillig opcodes (+/-) %
array_sort_inliner_max 895 (+425) +90.43%
array_sort_inliner_zero 895 (+425) +90.43%
array_sort_inliner_min 1,064 (+440) +70.51%
hashmap_inliner_max 51,516 (+2,295) +4.66%
hashmap_inliner_zero 72,284 (+2,476) +3.55%
hashmap_inliner_min 86,938 (+2,550) +3.02%
uhashmap_inliner_max 143,238 (+2,303) +1.63%
uhashmap_inliner_zero 175,575 (+2,484) +1.44%
uhashmap_inliner_min 195,259 (+2,550) +1.32%

@michaeljklein
Copy link
Contributor Author

Note: currently blocked by #7372

michaeljklein and others added 11 commits February 13, 2025 19:59
* master: (74 commits)
  feat: optimize out range checks on limiting cases (#7510)
  chore: clippy fixes (#7505)
  chore(docs): Supplement docs on `modexp` as a required precompile for Barretenberg's Solidity verifier (#7508)
  feat(debugger): REPL add breakpoint by sourcecode line (#5204)
  fix: issue duplicate error on impl function without self (#7490)
  feat(experimental): Support struct constructors in match patterns (#7489)
  feat: use resolved type instead of needing Constructor.struct_type (#7500)
  feat: better error message when keyword is found instead of type in p… (#7501)
  chore: bump external pinned commits (#7497)
  feat(experimental): Add invalid pattern syntax error (#7487)
  fix(performance): Accurately mark safe constant indices for arrays of complex types (#7491)
  fix(experimental): Allow shadowing in match patterns (#7484)
  chore: regression test #7195 (#7233)
  chore(docs): Section on `noir-profiler execution-opcodes` (#7480)
  chore: improve proptesting of 128bit values in `noirc_abi` (#7485)
  chore(profiler): Use brillig names for outputted flamegraphs  (#7470)
  chore(docs): Profiler images reference (#7481)
  fix: don't use dummy location when inserting debug code (#7482)
  feat(cli)!: Add `--unstable-features` to gate unstable features (#7449)
  feat: Sync from aztec-packages (#7474)
  ...
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 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 657d360 Previous: f0d47f8 Ratio
zkemail_noir-jwt_ 5 s 3 s 1.67

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

CC: @TomAFrench

@michaeljklein michaeljklein added the Blocked PR is blocked on an issue label Apr 2, 2025
@michaeljklein michaeljklein removed the Blocked PR is blocked on an issue label Apr 21, 2025
@michaeljklein michaeljklein marked this pull request as ready for review April 21, 2025 15:39
@michaeljklein michaeljklein requested a review from a team April 21, 2025 15:40
Copy link
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.

Looks good, just curious why Env was removed.
Confusing errors when passing an Env containing references since this function is given to brillig?

Copy link
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.

LGTM. Just need to exclude some tests from the debugger

@michaeljklein michaeljklein added this pull request to the merge queue Apr 30, 2025
Merged via the queue into master with commit 981256c Apr 30, 2025
115 checks passed
@michaeljklein michaeljklein deleted the michaeljklein/iterative-quicksort branch April 30, 2025 18:30
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request May 1, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: add `--debug-compile-stdin` to read `main.nr` from `STDIN` for
testing (noir-lang/noir#8253)
feat: better error message on unicode whitespace that isn't ascii
whitespace (noir-lang/noir#8295)
chore: update `quicksort` from iterative `noir_sort` version
(noir-lang/noir#7348)
fix: use correct meta attribute names in contract custom attributes
(noir-lang/noir#8273)
feat: `nargo expand` to show code after macro expansions
(noir-lang/noir#7613)
feat: allow specifying fuzz-related dirs when invoking `nargo test`
(noir-lang/noir#8293)
chore: redo typo PR by ciaranightingale
(noir-lang/noir#8292)
chore: Extend the bug list with issues found by the AST fuzzer
(noir-lang/noir#8285)
fix: don't disallow writing to memory after passing it to brillig
(noir-lang/noir#8276)
chore: test against zkpassport rsa lib
(noir-lang/noir#8278)
feat: omit element size array for more array types
(noir-lang/noir#8257)
chore: refactor array handling in ACIRgen
(noir-lang/noir#8256)
chore: document cast (noir-lang/noir#8268)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
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.

comptime intepretter fails with stack-too-deep error from recursing when quicksorting a not-excessively large array

3 participants