-
Notifications
You must be signed in to change notification settings - Fork 381
feat: Optimize array sets in if conditions (alternate version) #4716
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f36d9f5
Initial version of new pass
jfecher 222bc0e
clippy
jfecher 0a39c7b
chore: Add optimization to #4716 (#4718)
ef4decf
Merge branch 'master' into jf/opt-array-merging2
jfecher 398e9a7
Tracking changes more accurately makes performance worse
jfecher 2332906
Add constant check
jfecher cf5e9f6
Debug commit. Remove before merging
jfecher 4460aa0
Merge branch 'master' into jf/opt-array-merging2
2583069
Clippy
53ebf75
Make ArrayGet and ArraySet impure
9e50e33
Format
daaccd7
Remove type print debug
5ff5d27
Fmt
97548fc
Merge branch 'master' into jf/opt-array-merging2
TomAFrench 64ff6bf
merge with master
vezenovm e3d5474
fix array_get_value
vezenovm 5a7a73b
fix array_set_value
vezenovm 471398b
comment cleanup
vezenovm 21fda96
Merge branch 'master' into jf/opt-array-merging2
jfecher 7981b26
Merge branch 'jf/opt-array-merging2' of https://github.com/noir-lang/…
jfecher e637c00
Merge branch 'master' into jf/opt-array-merging2
jfecher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
7 changes: 7 additions & 0 deletions
7
test_programs/execution_success/nested_array_dynamic_simple/Nargo.toml
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [package] | ||
| name = "nested_array_dynamic_simple" | ||
| type = "bin" | ||
| authors = [""] | ||
| compiler_version = ">=0.28.0" | ||
|
|
||
| [dependencies] |
1 change: 1 addition & 0 deletions
1
test_programs/execution_success/nested_array_dynamic_simple/Prover.toml
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| x = "3" |
9 changes: 9 additions & 0 deletions
9
test_programs/execution_success/nested_array_dynamic_simple/src/main.nr
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| fn main(x: Field) { | ||
| // x = 3 | ||
| let array: [[(Field, [Field; 1], [Field; 1]); 1]; 1] = [[(1, [2], [3])]]; | ||
|
|
||
| let fetched_value = array[x - 3]; | ||
| assert(fetched_value[0].0 == 1); | ||
| assert(fetched_value[0].1[0] == 2); | ||
| assert(fetched_value[0].2[0] == 3); | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.