Skip to content

Commit 819a53a

Browse files
authored
feat: simplify Ord implementation for arrays (#7305)
1 parent 9ae3c6c commit 819a53a

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

.github/workflows/reports.yml

-4
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ jobs:
493493
jq --slurp '. | flatten' ./reports/* | tee time_bench.json
494494
495495
- name: Store benchmark result
496-
continue-on-error: true
497496
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
498497
with:
499498
name: "Compilation Time"
@@ -543,7 +542,6 @@ jobs:
543542
jq --slurp '. | flatten' ./reports/* | tee memory_bench.json
544543
545544
- name: Store benchmark result
546-
continue-on-error: true
547545
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
548546
with:
549547
name: "Compilation Memory"
@@ -593,7 +591,6 @@ jobs:
593591
jq --slurp '. | flatten' ./reports/* | tee memory_bench.json
594592
595593
- name: Store benchmark result
596-
continue-on-error: true
597594
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
598595
with:
599596
name: "Execution Memory"
@@ -644,7 +641,6 @@ jobs:
644641
jq --slurp '. | flatten' ./reports/* | tee time_bench.json
645642
646643
- name: Store benchmark result
647-
continue-on-error: true
648644
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
649645
with:
650646
name: "Execution Time"

.github/workflows/test-js-packages.yml

-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,6 @@ jobs:
622622
jq --slurp '. | flatten' ./reports/* | tee test_bench.json
623623
624624
- name: Store benchmark result
625-
continue-on-error: true
626625
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
627626
with:
628627
name: "Test Suite Duration"

noir_stdlib/src/cmp.nr

+2-14
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,7 @@ where
360360
let mut result = Ordering::equal();
361361
for i in 0..self.len() {
362362
if result == Ordering::equal() {
363-
let result_i = self[i].cmp(other[i]);
364-
365-
if result_i == Ordering::less() {
366-
result = result_i;
367-
} else if result_i == Ordering::greater() {
368-
result = result_i;
369-
}
363+
result = self[i].cmp(other[i]);
370364
}
371365
}
372366
result
@@ -383,13 +377,7 @@ where
383377
let mut result = self.len().cmp(other.len());
384378
for i in 0..self.len() {
385379
if result == Ordering::equal() {
386-
let result_i = self[i].cmp(other[i]);
387-
388-
if result_i == Ordering::less() {
389-
result = result_i;
390-
} else if result_i == Ordering::greater() {
391-
result = result_i;
392-
}
380+
result = self[i].cmp(other[i]);
393381
}
394382
}
395383
result

0 commit comments

Comments
 (0)