File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 9
9
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
10
//
11
11
//===----------------------------------------------------------------------===//
12
+ //
13
+ // We use this test to benchmark the runtime memory that Swift programs use.
14
+ //
15
+ // The Swift compiler caches the metadata that it needs to generate to support
16
+ // code that checks for protocol conformance and other operations that require
17
+ // use of metadata.
18
+ // This mechanism has the potential to allocate a lot of memory. This benchmark
19
+ // program generates 2^15 calls to swift_conformsToProtocol and fills the
20
+ // metadata/conformance caches with data that we never free. We use this
21
+ // program to track the runtime memory usage of swift programs. The test is
22
+ // optimized away in Release builds but kept in Debug mode.
23
+
12
24
13
25
import TestsUtils
14
26
protocol Pingable { }
You can’t perform that action at this time.
0 commit comments