File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/RegexBenchmark/Suite Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,15 @@ import RegexBuilder
44extension BenchmarkRunner {
55 mutating func addReluctantQuant( ) {
66 let size = 500000
7+ let s = String ( repeating: " a " , count: size)
78
89 let reluctantQuant = Benchmark (
910 name: " ReluctantQuant " ,
1011 regex: Regex {
1112 OneOrMore ( . any, . reluctant)
1213 } ,
1314 ty: . whole,
14- target: String ( repeating : " a " , count : size )
15+ target: s
1516 )
1617
1718 let eagarQuantWithTerminal = Benchmark (
@@ -21,7 +22,7 @@ extension BenchmarkRunner {
2122 " ; "
2223 } ,
2324 ty: . whole,
24- target: String ( repeating : " a " , count : size ) + " ; "
25+ target: s + " ; "
2526 )
2627
2728 let reluctantQuantWithTerminal = Benchmark (
@@ -31,7 +32,7 @@ extension BenchmarkRunner {
3132 " ; "
3233 } ,
3334 ty: . whole,
34- target: String ( repeating : " a " , count : size ) + " ; "
35+ target: s + " ; "
3536 )
3637
3738 register ( reluctantQuant)
You can’t perform that action at this time.
0 commit comments