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 {
4040
4141@inline ( never)
4242func runTest( ) {
43- for _ in 0 ..< 10_0000 {
43+ for _ in 0 ..< 15_0000 {
4444 if lookup ( " \u{1F1E7} \u{1F1E7} " , dict) {
4545 print ( " Found?! " )
4646 }
@@ -63,6 +63,7 @@ runTest()
6363let firstRun = getMemoryUsage ( ) - baseUsage
6464runTest ( )
6565runTest ( )
66+ runTest ( )
6667let secondRun = getMemoryUsage ( ) - baseUsage
6768
6869// CHECK-NOT: Found?!
@@ -73,9 +74,8 @@ print("Not found")
7374// CHECK: success
7475// CHECK-NOT: failure
7576
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) " )
7979} else {
80- print ( " success " )
80+ print ( " success firstRun: \( firstRun ) secondRun: \( secondRun ) " )
8181}
You can’t perform that action at this time.
0 commit comments