Skip to content

Commit b5e2e02

Browse files
committed
utils: change handling of generic specializations in analyze_code_size.py
Two changes: * If a function is a function signature (or any other) specialization of a generic specialization, count it is generic specialization. Function signature speializations are just small modifications of the original function, whereas generic specializations are real copies. So it makes more sense to "prioritize" generic specializations. * Create a separate category of generic specializations of stdlib functions.
1 parent 5f4688d commit b5e2e02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/analyze_code_size.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ def __init__(self):
8787
self.category_matching = [
8888
['Objective-C function', re.compile(r'.*[+-]\[')],
8989
['C++', re.compile(r'_+swift')],
90+
['Generic specialization of stdlib', re.compile(r'.*generic specialization.* of Swift\.')],
91+
['Generic specialization', re.compile(r'.*generic specialization')],
9092
['Merged function', re.compile(r'merged ')],
9193
['Key path', re.compile(r'key path')],
9294
['Function signature specialization',
9395
re.compile(r'function signature specialization')],
94-
['Generic specialization', re.compile(r'generic specialization')],
9596
['Reabstraction thunk helper',
9697
re.compile(r'reabstraction thunk helper')],
9798
['vtable thunk', re.compile(r'vtable thunk for')],

0 commit comments

Comments
 (0)