Skip to content
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: simplify Ord implementation for arrays #7305

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ jobs:
jq ".compilation_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./compilation_report.json > time_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Compilation Time"
Expand Down Expand Up @@ -540,7 +539,6 @@ jobs:
jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./memory_report.json > memory_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Compilation Memory"
Expand Down Expand Up @@ -591,7 +589,6 @@ jobs:
jq ".memory_reports | map({name: .artifact_name, value: (.peak_memory | tonumber), unit: \"MB\"}) " ./execution_memory_report.json > memory_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Execution Memory"
Expand Down Expand Up @@ -641,7 +638,6 @@ jobs:
jq ".execution_reports | map({name: .artifact_name, value: (.time[:-1] | tonumber), unit: \"s\"}) " ./execution_report.json > time_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Execution Time"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ jobs:
jq ".test_reports" < ./test_report.json > test_bench.json

- name: Store benchmark result
continue-on-error: true
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
with:
name: "Test Suite Duration"
Expand Down
16 changes: 2 additions & 14 deletions noir_stdlib/src/cmp.nr
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,7 @@ where
let mut result = Ordering::equal();
for i in 0..self.len() {
if result == Ordering::equal() {
let result_i = self[i].cmp(other[i]);

if result_i == Ordering::less() {
result = result_i;
} else if result_i == Ordering::greater() {
result = result_i;
}
result = self[i].cmp(other[i]);
}
}
result
Expand All @@ -383,13 +377,7 @@ where
let mut result = self.len().cmp(other.len());
for i in 0..self.len() {
if result == Ordering::equal() {
let result_i = self[i].cmp(other[i]);

if result_i == Ordering::less() {
result = result_i;
} else if result_i == Ordering::greater() {
result = result_i;
}
result = self[i].cmp(other[i]);
}
}
result
Expand Down