11
11
//===----------------------------------------------------------------------===//
12
12
13
13
// This test checks the performance of appending to an array.
14
+ //
15
+ // Note: Several benchmarks are marked .unstable until we have a way
16
+ // of controlling malloc behavior from the benchmark driver.
14
17
15
18
import TestsUtils
16
19
@@ -26,28 +29,28 @@ public let benchmarks = [
26
29
BenchmarkInfo ( name: " ArrayAppendGenericStructs " , runFunction: run_ArrayAppendGenericStructs, tags: t,
27
30
setUpFunction: { otherStructs = Array ( repeating: S ( x: 3 , y: 4.2 ) , count: 10_000 ) } ,
28
31
tearDownFunction: { otherStructs = nil } , legacyFactor: 10 ) ,
29
- BenchmarkInfo ( name: " ArrayAppendLatin1 " , runFunction: run_ArrayAppendLatin1, tags: t + [ . skip ] , legacyFactor: 34 ) ,
32
+ BenchmarkInfo ( name: " ArrayAppendLatin1 " , runFunction: run_ArrayAppendLatin1, tags: t + [ . unstable ] , legacyFactor: 34 ) ,
30
33
BenchmarkInfo ( name: " ArrayAppendLatin1Substring " , runFunction: run_ArrayAppendLatin1Substring, tags: t, legacyFactor: 36 ) ,
31
34
BenchmarkInfo ( name: " ArrayAppendLazyMap " , runFunction: run_ArrayAppendLazyMap, tags: t,
32
35
setUpFunction: { blackHole ( array) } , legacyFactor: 10 ) ,
33
- BenchmarkInfo ( name: " ArrayAppendOptionals " , runFunction: run_ArrayAppendOptionals, tags: t,
36
+ BenchmarkInfo ( name: " ArrayAppendOptionals " , runFunction: run_ArrayAppendOptionals, tags: t + [ . unstable ] ,
34
37
setUpFunction: { otherOptionalOnes = Array ( repeating: 1 , count: 10_000 ) } ,
35
38
tearDownFunction: { otherOptionalOnes = nil } , legacyFactor: 10 ) ,
36
- BenchmarkInfo ( name: " ArrayAppendRepeatCol " , runFunction: run_ArrayAppendRepeatCol, tags: t, legacyFactor: 10 ) ,
39
+ BenchmarkInfo ( name: " ArrayAppendRepeatCol " , runFunction: run_ArrayAppendRepeatCol, tags: t + [ . unstable ] , legacyFactor: 10 ) ,
37
40
BenchmarkInfo ( name: " ArrayAppendReserved " , runFunction: run_ArrayAppendReserved, tags: t, legacyFactor: 10 ) ,
38
41
BenchmarkInfo ( name: " ArrayAppendSequence " , runFunction: run_ArrayAppendSequence, tags: t, legacyFactor: 10 ) ,
39
42
BenchmarkInfo ( name: " ArrayAppendStrings " , runFunction: run_ArrayAppendStrings, tags: t,
40
43
setUpFunction: { otherStrings = stride ( from: 0 , to: 10_000 , by: 1 ) . map { " \( $0) " } } ,
41
44
tearDownFunction: { otherStrings = nil } , legacyFactor: 10 ) ,
42
- BenchmarkInfo ( name: " ArrayAppendToFromGeneric " , runFunction: run_ArrayAppendToFromGeneric, tags: t + [ . skip ] ,
45
+ BenchmarkInfo ( name: " ArrayAppendToFromGeneric " , runFunction: run_ArrayAppendToFromGeneric, tags: t + [ . unstable ] ,
43
46
setUpFunction: ones, tearDownFunction: releaseOnes, legacyFactor: 10 ) ,
44
47
BenchmarkInfo ( name: " ArrayAppendToGeneric " , runFunction: run_ArrayAppendToGeneric, tags: t,
45
48
setUpFunction: ones, tearDownFunction: releaseOnes, legacyFactor: 10 ) ,
46
- BenchmarkInfo ( name: " ArrayAppendUTF16 " , runFunction: run_ArrayAppendUTF16, tags: t + [ . skip ] , legacyFactor: 34 ) ,
49
+ BenchmarkInfo ( name: " ArrayAppendUTF16 " , runFunction: run_ArrayAppendUTF16, tags: t + [ . unstable ] , legacyFactor: 34 ) ,
47
50
BenchmarkInfo ( name: " ArrayAppendUTF16Substring " , runFunction: run_ArrayAppendUTF16Substring, tags: t, legacyFactor: 36 ) ,
48
51
BenchmarkInfo ( name: " ArrayPlusEqualArrayOfInt " , runFunction: run_ArrayPlusEqualArrayOfInt, tags: t + [ . unstable] ,
49
52
setUpFunction: ones, tearDownFunction: releaseOnes, legacyFactor: 10 ) ,
50
- BenchmarkInfo ( name: " ArrayPlusEqualFiveElementCollection " , runFunction: run_ArrayPlusEqualFiveElementCollection, tags: t + [ . skip ] , legacyFactor: 37 ) ,
53
+ BenchmarkInfo ( name: " ArrayPlusEqualFiveElementCollection " , runFunction: run_ArrayPlusEqualFiveElementCollection, tags: t + [ . unstable ] , legacyFactor: 37 ) ,
51
54
BenchmarkInfo ( name: " ArrayPlusEqualSingleElementCollection " , runFunction: run_ArrayPlusEqualSingleElementCollection, tags: t, legacyFactor: 47 ) ,
52
55
BenchmarkInfo ( name: " ArrayPlusEqualThreeElements " , runFunction: run_ArrayPlusEqualThreeElements, tags: t, legacyFactor: 10 ) ,
53
56
]
0 commit comments