Skip to content

Commit

Permalink
feat: simplify Ord implementation for arrays (#7305)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Feb 6, 2025
1 parent 9ae3c6c commit 819a53a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ jobs:
jq --slurp '. | flatten' ./reports/* | tee 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 @@ -543,7 +542,6 @@ jobs:
jq --slurp '. | flatten' ./reports/* | tee 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 @@ -593,7 +591,6 @@ jobs:
jq --slurp '. | flatten' ./reports/* | tee 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 @@ -644,7 +641,6 @@ jobs:
jq --slurp '. | flatten' ./reports/* | tee 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 --slurp '. | flatten' ./reports/* | tee 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

1 comment on commit 819a53a

@github-actions
Copy link
Contributor

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: 819a53a Previous: 9ae3c6c Ratio
AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 66 s 53 s 1.25

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

CC: @TomAFrench

Please sign in to comment.