File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1030,6 +1030,13 @@ public func run_SortStrings(_ N: Int) {
1030
1030
}
1031
1031
}
1032
1032
1033
+ public func run_SortSortedStrings( _ N: Int ) {
1034
+ let sortedBenchmarkWords = stringBenchmarkWords. sorted ( )
1035
+ for _ in 1 ... 5 * N {
1036
+ benchSortStrings ( sortedBenchmarkWords)
1037
+ }
1038
+ }
1039
+
1033
1040
var stringBenchmarkWordsUnicode : [ String ] = [
1034
1041
" ❄️woodshed " ,
1035
1042
" ❄️lakism " ,
Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ precommitTests = [
234
234
" SevenBoom " : run_SevenBoom,
235
235
" Sim2DArray " : run_Sim2DArray,
236
236
" SortLettersInPlace " : run_SortLettersInPlace,
237
+ " SortSortedStrings " : run_SortSortedStrings,
237
238
" SortStrings " : run_SortStrings,
238
239
" SortStringsUnicode " : run_SortStringsUnicode,
239
240
" StackPromo " : run_StackPromo,
You can’t perform that action at this time.
0 commit comments