@@ -6,7 +6,7 @@ extension Benchmark {
6
6
case . whole:
7
7
let result = target. wholeMatch ( of: regex)
8
8
if let match = result {
9
- if match. 0 . count > 100 {
9
+ if match. 0 . count > 1000 {
10
10
print ( " - Match: len = \( match. 0 . count) " )
11
11
} else {
12
12
print ( " - Match: \( match. 0 ) " )
@@ -22,7 +22,7 @@ extension Benchmark {
22
22
}
23
23
24
24
print ( " - Total matches: \( results. count) " )
25
- if results. count > 10 {
25
+ if results. count > 100 {
26
26
print ( " # Too many matches, not printing " )
27
27
let avgLen = results. map ( { result in String ( target [ result. range] ) . count} )
28
28
. reduce ( 0.0 , { $0 + Double( $1) } ) / Double( results. count)
@@ -32,7 +32,7 @@ extension Benchmark {
32
32
}
33
33
34
34
for match in results {
35
- if match. 0 . count > 100 {
35
+ if match. 0 . count > 1000 {
36
36
print ( " - Match: len = \( match. 0 . count) " )
37
37
} else {
38
38
print ( " - Match: \( match. 0 ) " )
@@ -42,7 +42,7 @@ extension Benchmark {
42
42
case . first:
43
43
let result = target. firstMatch ( of: regex)
44
44
if let match = result {
45
- if match. 0 . count > 100 {
45
+ if match. 0 . count > 1000 {
46
46
print ( " - Match: len = \( match. 0 . count) " )
47
47
} else {
48
48
print ( " - Match: \( match. 0 ) " )
@@ -66,13 +66,13 @@ extension NSBenchmark {
66
66
}
67
67
68
68
print ( " - Total matches: \( results. count) " )
69
- if results. count > 10 {
69
+ if results. count > 100 {
70
70
print ( " # Too many matches, not printing " )
71
71
return
72
72
}
73
73
74
74
for m in results {
75
- if m. range. length > 100 {
75
+ if m. range. length > 1000 {
76
76
print ( " - Match: len = \( m. range. length) " )
77
77
} else {
78
78
print ( " - Match: \( target [ Range ( m. range, in: target) !] ) " )
@@ -81,7 +81,7 @@ extension NSBenchmark {
81
81
case . first:
82
82
let result = regex. firstMatch ( in: target, range: range)
83
83
if let match = result {
84
- if match. range. length > 100 {
84
+ if match. range. length > 1000 {
85
85
print ( " - Match: len = \( match. range. length) " )
86
86
} else {
87
87
print ( " - Match: \( target [ Range ( match. range, in: target) !] ) " )
0 commit comments