-
Notifications
You must be signed in to change notification settings - Fork 204
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: Perform sorting of constant arrays at compile time #2195
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vezenovm
previously approved these changes
Aug 7, 2023
jfecher
requested changes
Aug 7, 2023
crates/nargo_cli/tests/test_data/array_dynamic/target/array_dynamic.json
Outdated
Show resolved
Hide resolved
jfecher
approved these changes
Aug 7, 2023
TomAFrench
added a commit
that referenced
this pull request
Aug 7, 2023
* master: chore: Remove symlink and dummy config file (#2200) fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172) feat: Only create new witnesses for distinctiveness when duplicates exist (#2191) chore: Use helper functions for getting values of `AcirVar`s (#2194) feat: Add support for slices of structs and nested slices in brillig (#2084) feat: Perform sorting of constant arrays at compile time (#2195)
TomAFrench
added a commit
that referenced
this pull request
Aug 7, 2023
* master: chore: Remove symlink and dummy config file (#2200) fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172) feat: Only create new witnesses for distinctiveness when duplicates exist (#2191) chore: Use helper functions for getting values of `AcirVar`s (#2194) feat: Add support for slices of structs and nested slices in brillig (#2084) feat: Perform sorting of constant arrays at compile time (#2195) chore: Improve unary error (#2199) chore: separate integration test cases into directories based on expected result (#2198) chore: remove stale comment (#2197) feat(nargo): Support custom entry points specified in TOML (#2158) fix(nargo): Indicate which TOML file is missing package name (#2177) fix: remove duplicated `name` option in `nargo new` (#2183) chore: add documentation to the `nargo lsp` command (#2169) feat(nargo)!: Require package `type` be specified in Nargo.toml (#2134) fix(nargo): Make dependencies section optional in TOML (#2161) chore: Do not create new memory block when not needed (#2142) fix: fix an ICE happening when we call a closure result from if/else (#2146) chore: remove unnecessary cloning of package dependencies (#2175)
TomAFrench
added a commit
that referenced
this pull request
Aug 7, 2023
* master: (35 commits) feat: Issue warning for signed integers (#2185) chore: Add `noir_wasm` testing workflow (#1921) chore: Remove symlink and dummy config file (#2200) fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172) feat: Only create new witnesses for distinctiveness when duplicates exist (#2191) chore: Use helper functions for getting values of `AcirVar`s (#2194) feat: Add support for slices of structs and nested slices in brillig (#2084) feat: Perform sorting of constant arrays at compile time (#2195) chore: Improve unary error (#2199) chore: separate integration test cases into directories based on expected result (#2198) chore: remove stale comment (#2197) feat(nargo): Support custom entry points specified in TOML (#2158) fix(nargo): Indicate which TOML file is missing package name (#2177) fix: remove duplicated `name` option in `nargo new` (#2183) chore: add documentation to the `nargo lsp` command (#2169) feat(nargo)!: Require package `type` be specified in Nargo.toml (#2134) fix(nargo): Make dependencies section optional in TOML (#2161) chore: Do not create new memory block when not needed (#2142) fix: fix an ICE happening when we call a closure result from if/else (#2146) chore: remove unnecessary cloning of package dependencies (#2175) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Resolves review comment https://github.com/noir-lang/noir/pull/1896/files#r1258872431
Summary*
This PR adds an optimisation which replaces any calls to the array sort intrinsic with a constant array with the output sorted array. This avoids us having to prove the validity of the sorting at runtime.
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.