File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ func lowercase(_ str: String) -> String {
40
40
41
41
@inline ( never)
42
42
func runTest( ) {
43
- for _ in 0 ..< 10_0000 {
43
+ for _ in 0 ..< 15_0000 {
44
44
if lookup ( " \u{1F1E7} \u{1F1E7} " , dict) {
45
45
print ( " Found?! " )
46
46
}
@@ -63,6 +63,7 @@ runTest()
63
63
let firstRun = getMemoryUsage ( ) - baseUsage
64
64
runTest ( )
65
65
runTest ( )
66
+ runTest ( )
66
67
let secondRun = getMemoryUsage ( ) - baseUsage
67
68
68
69
// CHECK-NOT: Found?!
@@ -73,9 +74,8 @@ print("Not found")
73
74
// CHECK: success
74
75
// CHECK-NOT: failure
75
76
76
- // We should not need 50MB for this.
77
- if firstRun * 2 < secondRun {
78
- print ( " failure - should not linearly increase " )
77
+ if firstRun * 3 < secondRun && firstRun > 10_000 {
78
+ print ( " failure - should not linearly increase firstRun: \( firstRun) secondRun: \( secondRun) " )
79
79
} else {
80
- print ( " success " )
80
+ print ( " success firstRun: \( firstRun ) secondRun: \( secondRun ) " )
81
81
}
You can’t perform that action at this time.
0 commit comments