-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Kill canonical mangling signature #4617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill canonical mangling signature #4617
Conversation
@swift-ci Please test |
Build failed |
Build failed |
e1d7986
to
4565dc1
Compare
@swift-ci Please test |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
4565dc1
to
9a8fc96
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
9a8fc96
to
c17c44f
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
Build failed |
c17c44f
to
49528fc
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
ffdb1f8
to
9b51e21
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
Build failed |
9b51e21
to
f626819
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
When devirtualizing witness method and class method calls, we transform apply instructions operating on the result of a SIL witness_method or class_method instruction to direct calls of a function_ref. The generic signature of the dynamic call site might not match the generic signature of the static thunk, so the substitution list from the dynamic apply instruction cannot be used directly; instead, we must transform it to a substitution list suitable for the static thunk. - With witness methods, the method is called using the protocol requirement's signature, <Self : P, ...>, however the witness thunk has a generic signature derived from the concrete witness. For example, the requirement might have a signature <Self : P, T>, where the concrete witness thunk might have a signature <X, Y>, where the concrete conforming type is G<X, Y>. At the call site, we substitute Self := G<X', Y'>; however to be able to call the witness thunk directly, we need to form substitutions X := X' and Y := Y'. - A similar situation occurs with class methods when the dynamically-dispatched call is performed against a derived class, but devirtualization actually finds the method on a base class of the derived class. The base class may have a different number of generic parameters than the derived class, either because the derived class makes some generic parameters of the base class concrete, or if the derived class introduces new generic parameters of its own. In both cases, we need to consider the generic signature of the dynamic call site (the protocol requirement or the derived class method) as well as the generic signature of the static thunk, and carefully remap the substitutions from one form into another. Previously the optimizer would implicitly rely on substitutions being in AllArchetypes order, in particular that concatenating outer substitutions with inner substitutions makes sense. This assumption is about to go away, so this patch refactors the optimizer to use some new abstractions for remapping substitution lists.
We used RequirementSources to identify redundant requirements when building the canonical mangling signature. There were a few problems with how this worked: - We used the Inferred requirement source for both requirements that were inferred from function parameter and result types (for example, T : Hashable in `func foo<T, U>(dict: [T : U])` and some completely unrelated things, like same-type constraints imposed on nested types by existing same-type constraints on the outer types. - We used the Protocol requirement source for associated type requirements on protocols as well as conformance requirements on inherited protocols. - Introducing a new Redundant requirement did not mark existing Explicit requirements as Redundant. None of these were an issue because of how canonical mangling signature construction works: - We already started with a canonical signature, so there were no Inferred requirements of the first kind (which we *do* want to keep here) - We dropped both Protocol and Redundant requirements, so it didn't matter that the distinction here was not sufficiently fine-grained - We never introduced Explicit requirements that would be later superceded by a Redundant requirement, because we always started with an existing canonical signature where such Explicit requirements were already dropped. However, I want to use the same algorithm for building the original signature as the canonical mangling signature, so this patch introduces these changes: - The Inferred source is now only used for inferred requirements of the first kind; the second kind are now Redundant - The Protocol source is now only used for associated type requirements; inherited protocol conformances are now Redundant - updateRequirementSource() now does the right thing with introduced Redundant requirements For now, this doesn't change much, but an upcoming patch refactors ArchetypeBuilder::getGenericSignature() to also use enumerateRequirements(), except dropping Redundant requirements only, and not Protocol.
Move the sorting algorithm from construction of the canonical mangling signature to requirement enumeration. This also changes how same-type constraints pick representatives, using the more canonical total order.
Instead of walking over PotentialArchetypes representatives directly and using a separate list to record same-type constraints, just use enumerateRequirements() and check the RequirementSource to drop redundant requirements. This means getGenericSignature() and getCanonicalManglingSignature() can share the same logic for collecting requirements; the only differences are the following: - both drop requirements from Redundant sources, but mangling signatures also drop requirements from Protocol sources - mangling signatures also canonicalize the types appearing in the final requirement
When checking a conformance of a concrete type to a protocol, we effectively checked the associated types twice -- once when deriving them, and another time at the end, where we performed a substitution of the protocol 'Self' type to the concrete type. The latter checked superclass constraints, while the former did not. However, this trick no longer works with minimized generic signatures, because <P : Self> no longer has redundant requirements for the associated types of 'P'. Instead, check superclass constraints at the same time as checking conformances.
Now that the previous patches have shaken out implicit assumptions about the order of generic requirements and substitutions, we can make a more radical change, dropping redundant protocol requirements when building the original generic signature. This means that the canonical ordering and minimization that we used to only perform when building the mangling signature is done all of the time, and hence getCanonicalManglingSignature() can go away. Usages now either call getCanonicalSignature(), or operate on the original signature directly.
When the call to checkGenericArguments() was removed from ConformanceChecker::checkConformance(), we stopped recording a dependency on the extended nominal type when checking an extension that adds a protocol conformance to the type. Fix this in a hacky way by recording an explicit dependency in the same place where we used to call checkGenericArguments(). Surely this is not the best place for it though, so this should be revisited since I'm pretty sure the old behavior was an accident.
This might look like a regression in lazyness at first sight, however this was previously being done implicitly by checking the 'Self := Adoptee' substitution against the protocol's generic signature, back when generic signatures had expanded requirements for protocol associated types. When generic signature minimization was switched on, this was no longer being done, as a result it was possible to construct code that would fail in the specializer with a missing conformance.
b29ec60
to
0c30979
Compare
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please benchmark |
@swift-ci Please performance test |
@please benchmark macOS |
@swift-ci Please benchmark macOS |
@swift-ci Please benchmark |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
SetIsSubsetOf | 554 | 517 | -6.7% | 1.07x(?) |
No Changes (135)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeStubToNSDate | 13453 | 12847 | -4.5% | 1.05x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 127036 | 120595 | -5.1% | 1.05x |
ObjectiveCBridgeStubNSDateMutationRef | 12450 | 12117 | -2.7% | 1.03x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 120248 | 117357 | -2.4% | 1.02x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 29648 | 28980 | -2.2% | 1.02x(?) |
NSDictionaryCastToSwift | 13249 | 12971 | -2.1% | 1.02x(?) |
135 | 3220590 | 3181420 | -1.2% | 1.01x |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 6107 | 6067 | -0.7% | 1.01x(?) |
SortLettersInPlace | 1000 | 995 | -0.5% | 1.01x(?) |
StringInterpolation | 11031 | 10939 | -0.8% | 1.01x(?) |
ObjectAllocation | 154 | 153 | -0.7% | 1.01x(?) |
ObjectiveCBridgeStubToNSDateRef | 3477 | 3456 | -0.6% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 77800 | 77207 | -0.8% | 1.01x |
ObjectiveCBridgeStubDataAppend | 2979 | 2955 | -0.8% | 1.01x |
DictionaryRemove | 5143 | 5107 | -0.7% | 1.01x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 63116 | 62352 | -1.2% | 1.01x(?) |
TwoSum | 1918 | 1906 | -0.6% | 1.01x |
ArraySubscript | 1432 | 1432 | +0.0% | 1.00x |
ObjectiveCBridgeToNSString | 1076 | 1077 | +0.1% | 1.00x |
DictionarySwapOfObjects | 7299 | 7272 | -0.4% | 1.00x(?) |
StackPromo | 19835 | 19845 | +0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 256166 | 255078 | -0.4% | 1.00x(?) |
RecursiveOwnedParameter | 1938 | 1938 | +0.0% | 1.00x |
ObjectiveCBridgeStubToNSString | 1289 | 1285 | -0.3% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 232993 | 232489 | -0.2% | 1.00x(?) |
ClassArrayGetter | 12 | 12 | +0.0% | 1.00x |
Array2D | 1979 | 1975 | -0.2% | 1.00x(?) |
Histogram | 681 | 682 | +0.1% | 1.00x |
SortStrings | 1752 | 1751 | -0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 5110 | 5101 | -0.2% | 1.00x(?) |
ObjectiveCBridgeStubFromNSDateRef | 3749 | 3743 | -0.2% | 1.00x |
MonteCarloPi | 45227 | 45240 | +0.0% | 1.00x |
StringWithCString | 153748 | 154086 | +0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSStringForced | 2597 | 2602 | +0.2% | 1.00x(?) |
Prims | 789 | 791 | +0.2% | 1.00x(?) |
DictionarySwap | 787 | 787 | +0.0% | 1.00x |
PopFrontArray | 1133 | 1132 | -0.1% | 1.00x(?) |
ArrayOfGenericPOD | 221 | 220 | -0.5% | 1.00x |
Dictionary3OfObjects | 896 | 898 | +0.2% | 1.00x(?) |
RangeAssignment | 310 | 310 | +0.0% | 1.00x |
ByteSwap | 1 | 1 | +0.0% | 1.00x |
SuperChars | 215292 | 215025 | -0.1% | 1.00x(?) |
XorLoop | 380 | 380 | +0.0% | 1.00x |
Integrate | 238 | 238 | +0.0% | 1.00x |
ObjectiveCBridgeStubFromNSString | 780 | 781 | +0.1% | 1.00x(?) |
ProtocolDispatch | 3043 | 3041 | -0.1% | 1.00x |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSSetAnyObject | 309597 | 310318 | +0.2% | 1.00x(?) |
ArrayLiteral | 1030 | 1030 | +0.0% | 1.00x |
Walsh | 331 | 331 | +0.0% | 1.00x |
Dictionary3 | 542 | 541 | -0.2% | 1.00x(?) |
Dictionary2 | 2102 | 2100 | -0.1% | 1.00x(?) |
SetIntersect_OfObjects | 2481 | 2488 | +0.3% | 1.00x(?) |
Join | 467 | 468 | +0.2% | 1.00x(?) |
ArrayOfRef | 3521 | 3534 | +0.4% | 1.00x(?) |
ObjectiveCBridgeToNSSet | 16381 | 16422 | +0.2% | 1.00x(?) |
ObjectiveCBridgeStubDateMutation | 273 | 273 | +0.0% | 1.00x |
NSError | 338 | 338 | +0.0% | 1.00x |
DictionaryOfObjects | 2370 | 2372 | +0.1% | 1.00x(?) |
PopFrontArrayGeneric | 1131 | 1130 | -0.1% | 1.00x(?) |
PopFrontUnsafePointer | 9273 | 9270 | -0.0% | 1.00x(?) |
StringEqualPointerComparison | 7292 | 7291 | -0.0% | 1.00x(?) |
CaptureProp | 4345 | 4343 | -0.1% | 1.00x(?) |
PolymorphicCalls | 15 | 15 | +0.0% | 1.00x |
RC4 | 267 | 267 | +0.0% | 1.00x |
ObjectiveCBridgeStubToNSStringRef | 123 | 123 | +0.0% | 1.00x |
Calculator | 31 | 31 | +0.0% | 1.00x |
MapReduce | 374 | 373 | -0.3% | 1.00x(?) |
AngryPhonebook | 2854 | 2854 | +0.0% | 1.00x |
IterateData | 2608 | 2607 | -0.0% | 1.00x(?) |
Hanoi | 3416 | 3422 | +0.2% | 1.00x(?) |
OpenClose | 51 | 51 | +0.0% | 1.00x |
DictionaryRemoveOfObjects | 20628 | 20688 | +0.3% | 1.00x(?) |
UTF8Decode | 323 | 323 | +0.0% | 1.00x |
SortStringsUnicode | 8102 | 8087 | -0.2% | 1.00x(?) |
Dictionary | 796 | 793 | -0.4% | 1.00x |
NopDeinit | 39675 | 39692 | +0.0% | 1.00x(?) |
SetIntersect | 1195 | 1195 | +0.0% | 1.00x |
SetExclusiveOr | 4040 | 4048 | +0.2% | 1.00x(?) |
ObjectiveCBridgeStubNSDateRefAccess | 309 | 308 | -0.3% | 1.00x |
StrToInt | 4988 | 4994 | +0.1% | 1.00x(?) |
ArrayOfGenericRef | 3608 | 3619 | +0.3% | 1.00x(?) |
StringHasSuffix | 678 | 678 | +0.0% | 1.00x |
Phonebook | 7160 | 7163 | +0.0% | 1.00x(?) |
ObjectiveCBridgeStubDateAccess | 182 | 182 | +0.0% | 1.00x |
Sim2DArray | 435 | 435 | +0.0% | 1.00x |
SetExclusiveOr_OfObjects | 8682 | 8655 | -0.3% | 1.00x(?) |
MonteCarloE | 10565 | 10570 | +0.1% | 1.00x(?) |
SetUnion_OfObjects | 7293 | 7317 | +0.3% | 1.00x(?) |
StringHasSuffixUnicode | 63823 | 63827 | +0.0% | 1.00x(?) |
HashTest | 1740 | 1735 | -0.3% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 511 | 511 | +0.0% | 1.00x |
ArrayAppend | 774 | 774 | +0.0% | 1.00x |
StringHasPrefixUnicode | 14174 | 14199 | +0.2% | 1.00x |
LinkedList | 7260 | 7260 | +0.0% | 1.00x |
RGBHistogramOfObjects | 22463 | 22402 | -0.3% | 1.00x(?) |
NSStringConversion | 821 | 822 | +0.1% | 1.00x(?) |
RGBHistogram | 3142 | 3136 | -0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 4319 | 4331 | +0.3% | 1.00x(?) |
ArrayValueProp4 | 6 | 6 | +0.0% | 1.00x |
ArrayOfPOD | 182 | 182 | +0.0% | 1.00x |
SetUnion | 2742 | 2741 | -0.0% | 1.00x(?) |
Chars | 557 | 557 | +0.0% | 1.00x |
StringBuilder | 1321 | 1320 | -0.1% | 1.00x(?) |
DeadArray | 185 | 185 | +0.0% | 1.00x |
ArrayValueProp2 | 6 | 6 | +0.0% | 1.00x |
BitCount | 1 | 1 | +0.0% | 1.00x |
AnyHashableWithAClass | 62668 | 62640 | -0.0% | 1.00x(?) |
SevenBoom | 1363 | 1362 | -0.1% | 1.00x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 96181 | 96186 | +0.0% | 1.00x(?) |
StringWalk | 5873 | 5875 | +0.0% | 1.00x(?) |
ArrayValueProp | 6 | 6 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSString | 1839 | 1841 | +0.1% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 235 | 235 | +0.0% | 1.00x |
ArrayAppendReserved | 537 | 537 | +0.0% | 1.00x |
ArrayValueProp3 | 6 | 6 | +0.0% | 1.00x |
DictionaryBridge | 4055 | 4100 | +1.1% | 0.99x |
ErrorHandling | 2893 | 2928 | +1.2% | 0.99x(?) |
ObjectiveCBridgeStubFromNSStringRef | 131 | 132 | +0.8% | 0.99x(?) |
ProtocolDispatch2 | 160 | 161 | +0.6% | 0.99x(?) |
StrComplexWalk | 2918 | 2944 | +0.9% | 0.99x(?) |
ObjectiveCBridgeStubURLAppendPathRef | 236087 | 239162 | +1.3% | 0.99x(?) |
ObjectiveCBridgeToNSArray | 29596 | 29908 | +1.1% | 0.99x(?) |
DictionaryLiteral | 4359 | 4403 | +1.0% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 157563 | 158606 | +0.7% | 0.99x(?) |
ArrayInClass | 85 | 86 | +1.2% | 0.99x(?) |
ObjectiveCBridgeToNSDictionary | 17057 | 17191 | +0.8% | 0.99x(?) |
ObjectiveCBridgeStubFromNSDate | 3567 | 3605 | +1.1% | 0.99x(?) |
StringHasPrefix | 644 | 657 | +2.0% | 0.98x |
StaticArray | 2870 | 2921 | +1.8% | 0.98x(?) |
ObjectiveCBridgeStubURLAppendPath | 236151 | 241231 | +2.1% | 0.98x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 148954 | 151497 | +1.7% | 0.98x(?) |
Dictionary2OfObjects | 3456 | 3522 | +1.9% | 0.98x |
ObjectiveCBridgeStubNSDataAppend | 2461 | 2518 | +2.3% | 0.98x(?) |
Regression (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
DictionarySwap | 10640 | 11705 | +10.0% | 0.91x |
Improvement (1)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
TypeFlood | 241 | 206 | -14.5% | 1.17x(?) |
No Changes (134)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSArrayAnyObjectForced | 10551 | 10084 | -4.4% | 1.05x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 126773 | 121455 | -4.2% | 1.04x |
ObjectiveCBridgeStubNSDateMutationRef | 14726 | 14264 | -3.1% | 1.03x |
StringBuilder | 2797 | 2717 | -2.9% | 1.03x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 178441 | 175802 | -1.5% | 1.02x(?) |
StringWalk | 22314 | 21816 | -2.2% | 1.02x(?) |
135 | 5922320 | 5869546 | -0.9% | 1.01x |
StringInterpolation | 15572 | 15479 | -0.6% | 1.01x(?) |
ObjectiveCBridgeStubFromNSStringRef | 169 | 168 | -0.6% | 1.01x(?) |
ObjectAllocation | 554 | 550 | -0.7% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 315060 | 313482 | -0.5% | 1.01x(?) |
Walsh | 13207 | 13137 | -0.5% | 1.01x |
DictionaryLiteral | 25334 | 25148 | -0.7% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 156014 | 154299 | -1.1% | 1.01x(?) |
SetIsSubsetOf | 3300 | 3264 | -1.1% | 1.01x(?) |
DeadArray | 121553 | 120414 | -0.9% | 1.01x(?) |
ArraySubscript | 5741 | 5758 | +0.3% | 1.00x(?) |
ObjectiveCBridgeToNSString | 1108 | 1108 | +0.0% | 1.00x |
DictionarySwapOfObjects | 25647 | 25651 | +0.0% | 1.00x(?) |
StackPromo | 131041 | 131366 | +0.2% | 1.00x(?) |
RecursiveOwnedParameter | 10746 | 10721 | -0.2% | 1.00x |
Integrate | 361 | 361 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 235580 | 235897 | +0.1% | 1.00x(?) |
ClassArrayGetter | 1334 | 1333 | -0.1% | 1.00x(?) |
Array2D | 844265 | 844300 | +0.0% | 1.00x(?) |
Histogram | 13621 | 13680 | +0.4% | 1.00x(?) |
SortStrings | 2710 | 2710 | +0.0% | 1.00x |
DictionaryBridge | 4073 | 4091 | +0.4% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 7535 | 7527 | -0.1% | 1.00x(?) |
ObjectiveCBridgeStubFromNSDateRef | 4050 | 4045 | -0.1% | 1.00x(?) |
ArrayOfGenericPOD | 3423 | 3419 | -0.1% | 1.00x |
StringWithCString | 155535 | 155572 | +0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSStringForced | 3038 | 3038 | +0.0% | 1.00x |
Prims | 15184 | 15171 | -0.1% | 1.00x(?) |
SortLettersInPlace | 2597 | 2592 | -0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 261337 | 262313 | +0.4% | 1.00x(?) |
Dictionary3OfObjects | 2700 | 2702 | +0.1% | 1.00x(?) |
RangeAssignment | 23877 | 23863 | -0.1% | 1.00x(?) |
StringHasPrefix | 1654 | 1652 | -0.1% | 1.00x(?) |
ByteSwap | 10 | 10 | +0.0% | 1.00x |
SuperChars | 265187 | 265012 | -0.1% | 1.00x(?) |
XorLoop | 19658 | 19656 | -0.0% | 1.00x(?) |
ObjectiveCBridgeStubToNSString | 1353 | 1352 | -0.1% | 1.00x(?) |
ObjectiveCBridgeStubFromNSString | 819 | 815 | -0.5% | 1.00x(?) |
StaticArray | 27229 | 27230 | +0.0% | 1.00x(?) |
ProtocolDispatch | 6138 | 6135 | -0.1% | 1.00x(?) |
ArrayLiteral | 1114 | 1113 | -0.1% | 1.00x(?) |
ProtocolDispatch2 | 441 | 440 | -0.2% | 1.00x(?) |
Dictionary3 | 2050 | 2050 | +0.0% | 1.00x |
StrComplexWalk | 7610 | 7611 | +0.0% | 1.00x(?) |
SetIntersect_OfObjects | 19898 | 19908 | +0.1% | 1.00x(?) |
Join | 1500 | 1499 | -0.1% | 1.00x |
ArrayOfRef | 9334 | 9341 | +0.1% | 1.00x(?) |
ObjectiveCBridgeStubURLAppendPathRef | 242521 | 243207 | +0.3% | 1.00x(?) |
ObjectiveCBridgeStubDateMutation | 434 | 433 | -0.2% | 1.00x |
NSError | 685 | 684 | -0.1% | 1.00x(?) |
PopFrontArrayGeneric | 9690 | 9686 | -0.0% | 1.00x(?) |
PopFrontUnsafePointer | 242742 | 242605 | -0.1% | 1.00x(?) |
StringEqualPointerComparison | 9681 | 9694 | +0.1% | 1.00x(?) |
CaptureProp | 119187 | 119196 | +0.0% | 1.00x(?) |
PolymorphicCalls | 1132 | 1132 | +0.0% | 1.00x |
RC4 | 9076 | 9074 | -0.0% | 1.00x(?) |
ObjectiveCBridgeStubToNSStringRef | 163 | 163 | +0.0% | 1.00x |
Calculator | 928 | 927 | -0.1% | 1.00x(?) |
MapReduce | 46934 | 46941 | +0.0% | 1.00x(?) |
AngryPhonebook | 3027 | 3035 | +0.3% | 1.00x(?) |
IterateData | 10649 | 10645 | -0.0% | 1.00x(?) |
Hanoi | 20067 | 20136 | +0.3% | 1.00x |
DictionaryRemoveOfObjects | 62781 | 62697 | -0.1% | 1.00x(?) |
UTF8Decode | 45168 | 45144 | -0.1% | 1.00x(?) |
SortStringsUnicode | 9323 | 9323 | +0.0% | 1.00x |
Dictionary | 2679 | 2678 | -0.0% | 1.00x(?) |
NopDeinit | 62773 | 62751 | -0.0% | 1.00x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 29527 | 29637 | +0.4% | 1.00x |
SetIntersect | 20221 | 20228 | +0.0% | 1.00x(?) |
ObjectiveCBridgeStubDataAppend | 3345 | 3331 | -0.4% | 1.00x(?) |
RGBHistogramOfObjects | 103468 | 103196 | -0.3% | 1.00x(?) |
ObjectiveCBridgeStubNSDateRefAccess | 1202 | 1200 | -0.2% | 1.00x(?) |
StrToInt | 5317 | 5317 | +0.0% | 1.00x |
ArrayInClass | 3867 | 3869 | +0.1% | 1.00x(?) |
ArrayOfGenericRef | 9980 | 10002 | +0.2% | 1.00x(?) |
StringHasSuffix | 1703 | 1703 | +0.0% | 1.00x |
ObjectiveCBridgeStubDateAccess | 1095 | 1095 | +0.0% | 1.00x |
Sim2DArray | 14632 | 14628 | -0.0% | 1.00x(?) |
SetExclusiveOr_OfObjects | 66123 | 66315 | +0.3% | 1.00x(?) |
MonteCarloPi | 53573 | 53511 | -0.1% | 1.00x |
MonteCarloE | 112347 | 112454 | +0.1% | 1.00x(?) |
SetUnion_OfObjects | 49353 | 49397 | +0.1% | 1.00x(?) |
StringHasSuffixUnicode | 64514 | 64407 | -0.2% | 1.00x(?) |
HashTest | 5357 | 5345 | -0.2% | 1.00x |
SetIsSubsetOf_OfObjects | 3081 | 3083 | +0.1% | 1.00x(?) |
ArrayAppend | 3429 | 3435 | +0.2% | 1.00x |
DictionaryRemove | 30582 | 30653 | +0.2% | 1.00x(?) |
StringHasPrefixUnicode | 15802 | 15798 | -0.0% | 1.00x(?) |
LinkedList | 27627 | 27581 | -0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 7442 | 7423 | -0.3% | 1.00x(?) |
ArrayValueProp4 | 2682 | 2684 | +0.1% | 1.00x(?) |
ArrayOfPOD | 2392 | 2391 | -0.0% | 1.00x |
SetUnion | 31517 | 31416 | -0.3% | 1.00x(?) |
Chars | 5352 | 5353 | +0.0% | 1.00x |
ArrayValueProp2 | 2849 | 2851 | +0.1% | 1.00x(?) |
BitCount | 92 | 92 | +0.0% | 1.00x |
AnyHashableWithAClass | 76831 | 76764 | -0.1% | 1.00x(?) |
SevenBoom | 1520 | 1518 | -0.1% | 1.00x(?) |
ArrayValueProp | 2305 | 2312 | +0.3% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 5062 | 5081 | +0.4% | 1.00x |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 20666 | 20665 | -0.0% | 1.00x(?) |
Dictionary2OfObjects | 6852 | 6854 | +0.0% | 1.00x(?) |
ArrayAppendReserved | 3181 | 3183 | +0.1% | 1.00x(?) |
ArrayValueProp3 | 2760 | 2756 | -0.1% | 1.00x(?) |
ObjectiveCBridgeStubFromNSDate | 3814 | 3815 | +0.0% | 1.00x |
PopFrontArray | 24847 | 25127 | +1.1% | 0.99x(?) |
ErrorHandling | 3724 | 3772 | +1.3% | 0.99x(?) |
Dictionary2 | 5018 | 5051 | +0.7% | 0.99x |
ObjectiveCBridgeToNSSet | 16774 | 16939 | +1.0% | 0.99x(?) |
ObjectiveCBridgeToNSArray | 30229 | 30524 | +1.0% | 0.99x(?) |
DictionaryOfObjects | 5528 | 5577 | +0.9% | 0.99x(?) |
ObjectiveCBridgeStubToNSDateRef | 3330 | 3357 | +0.8% | 0.99x |
OpenClose | 449 | 455 | +1.3% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 80923 | 81969 | +1.3% | 0.99x(?) |
SetExclusiveOr | 46041 | 46390 | +0.8% | 0.99x(?) |
Phonebook | 62912 | 63247 | +0.5% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 133393 | 134963 | +1.2% | 0.99x(?) |
NSStringConversion | 2990 | 3011 | +0.7% | 0.99x(?) |
RGBHistogram | 51766 | 52134 | +0.7% | 0.99x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 61087 | 61522 | +0.7% | 0.99x(?) |
TwoSum | 9263 | 9348 | +0.9% | 0.99x |
ObjectiveCBridgeStubURLAppendPath | 241035 | 245508 | +1.9% | 0.98x(?) |
ObjectiveCBridgeToNSDictionary | 17053 | 17353 | +1.8% | 0.98x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 93250 | 94716 | +1.6% | 0.98x(?) |
ObjectiveCBridgeStubNSDataAppend | 2758 | 2803 | +1.6% | 0.98x |
ObjectiveCBridgeStubToNSDate | 13277 | 13795 | +3.9% | 0.96x(?) |
NSDictionaryCastToSwift | 14152 | 14725 | +4.0% | 0.96x(?) |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StaticArray | 2736 | 2916 | +6.6% | 0.94x(?) |
AnyHashableWithAClass | 63869 | 67697 | +6.0% | 0.94x |
MapReduce | 386 | 411 | +6.5% | 0.94x(?) |
Improvement (5)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 244800 | 230944 | -5.7% | 1.06x(?) |
NopDeinit | 38863 | 36573 | -5.9% | 1.06x |
StringHasPrefixUnicode | 14740 | 13842 | -6.1% | 1.06x(?) |
ObjectiveCBridgeFromNSStringForced | 2918 | 2676 | -8.3% | 1.09x |
ObjectiveCBridgeFromNSArrayAnyObject | 87593 | 80097 | -8.6% | 1.09x |
No Changes (128)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSArrayAnyObjectForced | 6486 | 6200 | -4.4% | 1.05x |
ObjectAllocation | 157 | 150 | -4.5% | 1.05x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 175308 | 166456 | -5.0% | 1.05x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 97234 | 92986 | -4.4% | 1.05x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 30563 | 29291 | -4.2% | 1.04x |
Array2D | 2108 | 2046 | -2.9% | 1.03x(?) |
PopFrontArray | 1171 | 1140 | -2.6% | 1.03x(?) |
StringHasPrefix | 652 | 633 | -2.9% | 1.03x(?) |
Calculator | 31 | 30 | -3.2% | 1.03x |
SetIsSubsetOf | 534 | 518 | -3.0% | 1.03x(?) |
ArrayOfGenericRef | 3687 | 3574 | -3.1% | 1.03x(?) |
Sim2DArray | 454 | 440 | -3.1% | 1.03x(?) |
ObjectiveCBridgeStubNSDateMutationRef | 12407 | 12055 | -2.8% | 1.03x(?) |
SuperChars | 217602 | 212322 | -2.4% | 1.02x |
StringInterpolation | 11211 | 10997 | -1.9% | 1.02x(?) |
StringHasSuffixUnicode | 64936 | 63876 | -1.6% | 1.02x(?) |
ProtocolDispatch2 | 165 | 161 | -2.4% | 1.02x(?) |
StrComplexWalk | 2980 | 2926 | -1.8% | 1.02x |
ObjectiveCBridgeStubToNSDateRef | 3413 | 3348 | -1.9% | 1.02x(?) |
PopFrontArrayGeneric | 1173 | 1145 | -2.4% | 1.02x |
SetExclusiveOr | 3979 | 3918 | -1.5% | 1.02x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 127432 | 125069 | -1.9% | 1.02x |
StringBuilder | 1318 | 1291 | -2.0% | 1.02x(?) |
ObjectiveCBridgeStubNSDataAppend | 2550 | 2499 | -2.0% | 1.02x(?) |
StringHasSuffix | 685 | 671 | -2.0% | 1.02x(?) |
Dictionary2OfObjects | 3516 | 3431 | -2.4% | 1.02x(?) |
135 | 3447259 | 3403256 | -1.3% | 1.01x |
SortStrings | 1730 | 1719 | -0.6% | 1.01x(?) |
ObjectiveCBridgeStubFromNSDateRef | 3756 | 3725 | -0.8% | 1.01x(?) |
ProtocolDispatch | 3095 | 3060 | -1.1% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 315377 | 311086 | -1.4% | 1.01x(?) |
Dictionary3 | 538 | 535 | -0.6% | 1.01x(?) |
Dictionary2 | 2090 | 2078 | -0.6% | 1.01x(?) |
ArrayOfRef | 3573 | 3546 | -0.8% | 1.01x(?) |
ObjectiveCBridgeStubURLAppendPathRef | 257623 | 254110 | -1.4% | 1.01x(?) |
ArrayAppend | 758 | 747 | -1.4% | 1.01x |
DictionaryRemoveOfObjects | 20428 | 20263 | -0.8% | 1.01x(?) |
UTF8Decode | 318 | 316 | -0.6% | 1.01x(?) |
Dictionary | 797 | 791 | -0.8% | 1.01x(?) |
MonteCarloPi | 43209 | 42805 | -0.9% | 1.01x(?) |
MonteCarloE | 10126 | 10073 | -0.5% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 4387 | 4354 | -0.8% | 1.01x(?) |
Chars | 573 | 568 | -0.9% | 1.01x |
StringWalk | 5683 | 5645 | -0.7% | 1.01x(?) |
ObjectiveCBridgeToNSString | 1084 | 1089 | +0.5% | 1.00x(?) |
StackPromo | 19486 | 19449 | -0.2% | 1.00x(?) |
RecursiveOwnedParameter | 1846 | 1852 | +0.3% | 1.00x(?) |
ClassArrayGetter | 12 | 12 | +0.0% | 1.00x |
OpenClose | 51 | 51 | +0.0% | 1.00x |
StringWithCString | 146664 | 146869 | +0.1% | 1.00x(?) |
DictionarySwap | 812 | 812 | +0.0% | 1.00x |
RangeAssignment | 321 | 320 | -0.3% | 1.00x(?) |
ByteSwap | 1 | 1 | +0.0% | 1.00x |
XorLoop | 362 | 362 | +0.0% | 1.00x |
ObjectiveCBridgeStubFromNSString | 800 | 802 | +0.2% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
ArrayLiteral | 1031 | 1028 | -0.3% | 1.00x(?) |
SetIntersect_OfObjects | 2314 | 2323 | +0.4% | 1.00x(?) |
NSError | 334 | 333 | -0.3% | 1.00x(?) |
DictionaryOfObjects | 2367 | 2365 | -0.1% | 1.00x(?) |
PopFrontUnsafePointer | 9031 | 9033 | +0.0% | 1.00x(?) |
StringEqualPointerComparison | 7581 | 7546 | -0.5% | 1.00x(?) |
PolymorphicCalls | 14 | 14 | +0.0% | 1.00x |
IterateData | 2539 | 2543 | +0.2% | 1.00x(?) |
ArrayOfGenericPOD | 208 | 208 | +0.0% | 1.00x |
ObjectiveCBridgeStubDataAppend | 3016 | 3026 | +0.3% | 1.00x(?) |
RGBHistogramOfObjects | 21969 | 22002 | +0.1% | 1.00x(?) |
StrToInt | 5073 | 5067 | -0.1% | 1.00x(?) |
ArrayInClass | 89 | 89 | +0.0% | 1.00x |
ObjectiveCBridgeStubDateAccess | 182 | 182 | +0.0% | 1.00x |
SetExclusiveOr_OfObjects | 8426 | 8420 | -0.1% | 1.00x(?) |
SetUnion_OfObjects | 7099 | 7068 | -0.4% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
SetIsSubsetOf_OfObjects | 502 | 504 | +0.4% | 1.00x |
ObjectiveCBridgeToNSSet | 16722 | 16778 | +0.3% | 1.00x(?) |
LinkedList | 6853 | 6857 | +0.1% | 1.00x(?) |
ArrayValueProp4 | 5 | 5 | +0.0% | 1.00x |
ArrayOfPOD | 172 | 172 | +0.0% | 1.00x |
BitCount | 1 | 1 | +0.0% | 1.00x |
AngryPhonebook | 2923 | 2910 | -0.4% | 1.00x(?) |
ArrayValueProp | 5 | 5 | +0.0% | 1.00x |
RC4 | 257 | 256 | -0.4% | 1.00x(?) |
Memset | 222 | 222 | +0.0% | 1.00x |
ArrayAppendReserved | 532 | 533 | +0.2% | 1.00x(?) |
ArrayValueProp2 | 5 | 5 | +0.0% | 1.00x |
ArrayValueProp3 | 5 | 5 | +0.0% | 1.00x |
ArraySubscript | 1385 | 1394 | +0.7% | 0.99x(?) |
DictionarySwapOfObjects | 6761 | 6836 | +1.1% | 0.99x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 256363 | 260071 | +1.4% | 0.99x(?) |
Integrate | 249 | 252 | +1.2% | 0.99x(?) |
Histogram | 667 | 674 | +1.1% | 0.99x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 5121 | 5180 | +1.1% | 0.99x(?) |
Prims | 769 | 773 | +0.5% | 0.99x(?) |
SortLettersInPlace | 974 | 980 | +0.6% | 0.99x(?) |
Dictionary3OfObjects | 882 | 893 | +1.2% | 0.99x(?) |
ObjectiveCBridgeStubToNSString | 1259 | 1278 | +1.5% | 0.99x(?) |
HashTest | 1720 | 1737 | +1.0% | 0.99x(?) |
ObjectiveCBridgeStubDateMutation | 272 | 274 | +0.7% | 0.99x(?) |
ObjectiveCBridgeStubToNSStringRef | 119 | 120 | +0.8% | 0.99x(?) |
Hanoi | 3392 | 3426 | +1.0% | 0.99x(?) |
SortStringsUnicode | 8259 | 8341 | +1.0% | 0.99x(?) |
ObjectiveCBridgeStubNSDateRefAccess | 313 | 317 | +1.3% | 0.99x(?) |
Walsh | 336 | 338 | +0.6% | 0.99x(?) |
RGBHistogram | 3154 | 3184 | +0.9% | 0.99x(?) |
SetUnion | 2736 | 2751 | +0.6% | 0.99x(?) |
DeadArray | 185 | 187 | +1.1% | 0.99x |
TwoSum | 1899 | 1924 | +1.3% | 0.99x(?) |
DictionaryBridge | 4038 | 4125 | +2.1% | 0.98x(?) |
Join | 454 | 464 | +2.2% | 0.98x(?) |
ObjectiveCBridgeStubFromNSStringRef | 130 | 133 | +2.3% | 0.98x(?) |
CaptureProp | 4416 | 4529 | +2.6% | 0.98x(?) |
DictionaryLiteral | 4430 | 4506 | +1.7% | 0.98x(?) |
ObjectiveCBridgeFromNSString | 1869 | 1905 | +1.9% | 0.98x(?) |
NSStringConversion | 814 | 828 | +1.7% | 0.98x(?) |
SevenBoom | 1344 | 1366 | +1.6% | 0.98x(?) |
ObjectiveCBridgeStubToNSDate | 13306 | 13678 | +2.8% | 0.97x(?) |
ErrorHandling | 2865 | 2947 | +2.9% | 0.97x(?) |
ObjectiveCBridgeToNSArray | 30540 | 31437 | +2.9% | 0.97x(?) |
ObjectiveCBridgeStubURLAppendPath | 247505 | 254523 | +2.8% | 0.97x(?) |
Phonebook | 6926 | 7131 | +3.0% | 0.97x(?) |
DictionaryRemove | 5228 | 5376 | +2.8% | 0.97x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 61055 | 63113 | +3.4% | 0.97x(?) |
ObjectiveCBridgeStubFromNSDate | 3581 | 3706 | +3.5% | 0.97x(?) |
NSDictionaryCastToSwift | 13125 | 13673 | +4.2% | 0.96x(?) |
ObjectiveCBridgeToNSDictionary | 17038 | 17806 | +4.5% | 0.96x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 121758 | 128670 | +5.7% | 0.95x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 155891 | 163801 | +5.1% | 0.95x(?) |
SetIntersect | 1155 | 1220 | +5.6% | 0.95x(?) |
Regression (4)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
TypeFlood | 210 | 243 | +15.7% | 0.86x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 156648 | 173104 | +10.5% | 0.90x |
ObjectiveCBridgeStubToNSStringRef | 160 | 174 | +8.8% | 0.92x(?) |
PolymorphicCalls | 1171 | 1257 | +7.3% | 0.93x |
Improvement (3)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSSetAnyObjectForced | 8283 | 7640 | -7.8% | 1.08x |
StringWalk | 24836 | 22887 | -7.8% | 1.09x(?) |
StringHasPrefix | 1646 | 1485 | -9.8% | 1.11x |
No Changes (129)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
OpenClose | 463 | 441 | -4.8% | 1.05x |
SevenBoom | 1602 | 1532 | -4.4% | 1.05x(?) |
NopDeinit | 64498 | 61927 | -4.0% | 1.04x(?) |
ObjectiveCBridgeStubNSDateRefAccess | 1285 | 1236 | -3.8% | 1.04x |
Array2D | 832530 | 809752 | -2.7% | 1.03x |
ObjectiveCBridgeStubDateMutation | 464 | 452 | -2.6% | 1.03x |
ObjectiveCBridgeStubToArrayOfNSString | 30303 | 29413 | -2.9% | 1.03x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 183168 | 178690 | -2.4% | 1.03x |
BitCount | 97 | 94 | -3.1% | 1.03x(?) |
135 | 6094443 | 5967178 | -2.1% | 1.02x |
DictionarySwapOfObjects | 25348 | 24920 | -1.7% | 1.02x(?) |
Prims | 14810 | 14496 | -2.1% | 1.02x(?) |
AnyHashableWithAClass | 78236 | 76826 | -1.8% | 1.02x(?) |
StringHasSuffix | 1713 | 1673 | -2.3% | 1.02x(?) |
ObjectiveCBridgeStubToNSString | 1354 | 1321 | -2.4% | 1.02x(?) |
StaticArray | 28287 | 27736 | -1.9% | 1.02x(?) |
ObjectiveCBridgeToNSArray | 30788 | 30086 | -2.3% | 1.02x(?) |
NSError | 684 | 668 | -2.3% | 1.02x(?) |
PopFrontArrayGeneric | 9755 | 9547 | -2.1% | 1.02x(?) |
UTF8Decode | 44202 | 43344 | -1.9% | 1.02x(?) |
SortStringsUnicode | 9547 | 9352 | -2.0% | 1.02x(?) |
SetIsSubsetOf | 3148 | 3074 | -2.4% | 1.02x(?) |
ArrayOfGenericRef | 9790 | 9623 | -1.7% | 1.02x(?) |
ObjectiveCBridgeToNSDictionary | 17996 | 17664 | -1.8% | 1.02x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 97698 | 95962 | -1.8% | 1.02x(?) |
ObjectiveCBridgeToNSString | 1161 | 1149 | -1.0% | 1.01x(?) |
PopFrontArray | 25269 | 24956 | -1.2% | 1.01x(?) |
RecursiveOwnedParameter | 10225 | 10087 | -1.4% | 1.01x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 242499 | 241071 | -0.6% | 1.01x(?) |
StringWithCString | 149720 | 148877 | -0.6% | 1.01x(?) |
SortLettersInPlace | 2592 | 2579 | -0.5% | 1.01x(?) |
XorLoop | 19031 | 18793 | -1.2% | 1.01x(?) |
StringInterpolation | 15560 | 15448 | -0.7% | 1.01x(?) |
AngryPhonebook | 3061 | 3033 | -0.9% | 1.01x(?) |
Walsh | 12721 | 12621 | -0.8% | 1.01x(?) |
Dictionary2 | 4984 | 4922 | -1.2% | 1.01x(?) |
SetIntersect_OfObjects | 19390 | 19284 | -0.6% | 1.01x(?) |
Join | 1471 | 1450 | -1.4% | 1.01x(?) |
StringEqualPointerComparison | 9958 | 9819 | -1.4% | 1.01x(?) |
RC4 | 8890 | 8787 | -1.2% | 1.01x(?) |
DictionaryLiteral | 25621 | 25297 | -1.3% | 1.01x(?) |
SetIntersect | 20156 | 19970 | -0.9% | 1.01x(?) |
SetExclusiveOr_OfObjects | 64126 | 63667 | -0.7% | 1.01x(?) |
HashTest | 5249 | 5199 | -0.9% | 1.01x(?) |
StringHasPrefixUnicode | 15849 | 15695 | -1.0% | 1.01x(?) |
RGBHistogram | 51303 | 50850 | -0.9% | 1.01x(?) |
ArrayAppendReserved | 3311 | 3286 | -0.8% | 1.01x(?) |
ArrayOfPOD | 2376 | 2356 | -0.8% | 1.01x(?) |
SetUnion | 30735 | 30431 | -1.0% | 1.01x |
Chars | 5503 | 5439 | -1.2% | 1.01x(?) |
DeadArray | 121088 | 119822 | -1.1% | 1.01x(?) |
ArrayValueProp | 2323 | 2302 | -0.9% | 1.01x(?) |
ObjectiveCBridgeStubFromArrayOfNSString | 60669 | 60163 | -0.8% | 1.01x(?) |
ObjectiveCBridgeStubNSDateMutationRef | 14740 | 14652 | -0.6% | 1.01x(?) |
MonteCarloPi | 51490 | 51240 | -0.5% | 1.00x(?) |
StackPromo | 133856 | 133707 | -0.1% | 1.00x(?) |
Integrate | 369 | 369 | +0.0% | 1.00x |
ClassArrayGetter | 1266 | 1260 | -0.5% | 1.00x(?) |
Histogram | 13657 | 13595 | -0.5% | 1.00x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 10322 | 10331 | +0.1% | 1.00x(?) |
DictionarySwap | 10458 | 10491 | +0.3% | 1.00x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 263944 | 265140 | +0.5% | 1.00x(?) |
ByteSwap | 10 | 10 | +0.0% | 1.00x |
ObjectiveCBridgeStubToNSDate | 13781 | 13745 | -0.3% | 1.00x(?) |
ObjectiveCBridgeStubFromNSString | 829 | 831 | +0.2% | 1.00x(?) |
ProtocolDispatch2 | 445 | 445 | +0.0% | 1.00x |
ArrayOfRef | 8998 | 8996 | -0.0% | 1.00x(?) |
ObjectiveCBridgeStubURLAppendPathRef | 250476 | 250682 | +0.1% | 1.00x(?) |
DictionaryOfObjects | 5566 | 5591 | +0.5% | 1.00x(?) |
ObjectiveCBridgeStubToNSDateRef | 3397 | 3401 | +0.1% | 1.00x(?) |
Hanoi | 19823 | 19775 | -0.2% | 1.00x(?) |
Dictionary | 2673 | 2660 | -0.5% | 1.00x(?) |
ArrayInClass | 3707 | 3693 | -0.4% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 5186 | 5207 | +0.4% | 1.00x(?) |
ObjectiveCBridgeStubDateAccess | 1132 | 1132 | +0.0% | 1.00x |
MonteCarloE | 108144 | 108076 | -0.1% | 1.00x(?) |
SetUnion_OfObjects | 47724 | 47829 | +0.2% | 1.00x(?) |
StringHasSuffixUnicode | 65758 | 65462 | -0.5% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 2945 | 2940 | -0.2% | 1.00x(?) |
LinkedList | 26091 | 26121 | +0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 138074 | 138297 | +0.2% | 1.00x(?) |
NSStringConversion | 3046 | 3033 | -0.4% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 20050 | 20091 | +0.2% | 1.00x(?) |
ArrayValueProp3 | 2875 | 2861 | -0.5% | 1.00x(?) |
ArraySubscript | 5501 | 5552 | +0.9% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 126715 | 128253 | +1.2% | 0.99x(?) |
ObjectiveCBridgeStubFromNSDateRef | 4119 | 4167 | +1.2% | 0.99x |
ObjectiveCBridgeFromNSStringForced | 3102 | 3140 | +1.2% | 0.99x(?) |
RangeAssignment | 23508 | 23695 | +0.8% | 0.99x(?) |
ProtocolDispatch | 6353 | 6420 | +1.1% | 0.99x(?) |
Dictionary3 | 1968 | 1992 | +1.2% | 0.99x(?) |
PopFrontUnsafePointer | 243352 | 246572 | +1.3% | 0.99x(?) |
Calculator | 899 | 905 | +0.7% | 0.99x(?) |
MapReduce | 45482 | 45851 | +0.8% | 0.99x(?) |
DictionaryRemoveOfObjects | 61068 | 61382 | +0.5% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObject | 81690 | 82629 | +1.1% | 0.99x(?) |
ObjectiveCBridgeStubDataAppend | 3399 | 3444 | +1.3% | 0.99x(?) |
NSDictionaryCastToSwift | 14400 | 14615 | +1.5% | 0.99x(?) |
RGBHistogramOfObjects | 100063 | 100718 | +0.7% | 0.99x(?) |
Sim2DArray | 14206 | 14408 | +1.4% | 0.99x(?) |
ObjectiveCBridgeToNSSet | 17188 | 17356 | +1.0% | 0.99x(?) |
ArrayLiteral | 1086 | 1102 | +1.5% | 0.99x(?) |
Dictionary2OfObjects | 6791 | 6836 | +0.7% | 0.99x(?) |
TwoSum | 9025 | 9147 | +1.4% | 0.99x(?) |
ObjectiveCBridgeStubNSDataAppend | 2787 | 2827 | +1.4% | 0.99x(?) |
SortStrings | 2701 | 2768 | +2.5% | 0.98x(?) |
DictionaryBridge | 4165 | 4266 | +2.4% | 0.98x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 7634 | 7829 | +2.5% | 0.98x(?) |
SuperChars | 256241 | 260739 | +1.8% | 0.98x(?) |
ErrorHandling | 3734 | 3815 | +2.2% | 0.98x(?) |
ObjectAllocation | 555 | 564 | +1.6% | 0.98x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 313991 | 321277 | +2.3% | 0.98x |
ArrayAppend | 3479 | 3540 | +1.8% | 0.98x(?) |
CaptureProp | 118242 | 120062 | +1.5% | 0.98x(?) |
IterateData | 10503 | 10731 | +2.2% | 0.98x(?) |
SetExclusiveOr | 44623 | 45495 | +1.9% | 0.98x(?) |
StrToInt | 5394 | 5488 | +1.7% | 0.98x(?) |
DictionaryRemove | 30579 | 31145 | +1.9% | 0.98x(?) |
ArrayValueProp2 | 2826 | 2897 | +2.5% | 0.98x(?) |
Dictionary3OfObjects | 2599 | 2672 | +2.8% | 0.97x(?) |
ObjectiveCBridgeStubFromNSStringRef | 164 | 169 | +3.0% | 0.97x(?) |
ArrayOfGenericPOD | 3417 | 3525 | +3.2% | 0.97x(?) |
ObjectiveCBridgeStubURLAppendPath | 249799 | 258408 | +3.5% | 0.97x |
Phonebook | 62983 | 64673 | +2.7% | 0.97x(?) |
ObjectiveCBridgeStubFromNSDate | 3839 | 3951 | +2.9% | 0.97x(?) |
StringBuilder | 2664 | 2763 | +3.7% | 0.96x(?) |
StrComplexWalk | 7630 | 8020 | +5.1% | 0.95x(?) |
ArrayValueProp4 | 2742 | 2901 | +5.8% | 0.95x |
This PR builds upon my previous PRs which removed
AllArchetypes
, #4451 and #4524.Now that
AllArchetypes
is gone, there were a few places the old order of generic requirements in a signature still came up. In particular, we had two ways of building generic signatures:getCanonicalManglingSignature()
which dropped requirements that could be inferred from protocol declarations, and also attempted to pick representatives of same-type classes in a more canonical way -- this was used for mangling, and for building substitution listsThis PR merges the additional canonicalization performed by the second step into the first step, so all generic signatures are minimized now, and representatives of same-type classes are always canonical according to a total order among archetypes.
This eliminates some code duplication and also uncovers a few places in the optimizer where we would make assumptions about the order of requirements in a signature. In these places, we would build substitution lists by hand. This PR changes the optimizer to use the new utility methods on GenericSignature where appropriate, which simplifies the code and makes it more robust.
For those following along, here are the next steps, but I can't promise I'll be working on these in any order or time frame:
ProtocolConformance
structures produced by the type checker to use interface type substitutions rather than archetypes.SubstitutedGenericSignature
structure. This might simplify some logic in IRGen for emitting metadata sources for protocol methods too.AbstractTypeParamDecl::getArchetype()
is still there, but it's on its way out.PolymorphicFunctionType
will go soon, and in the longer term, non-interface types inValueDecl
s.ValueDecl
s no longer have archetypes appearing in their signatures,AssociatedTypeType
can go.ValueDecl
s to interface types completely is that we can stop serializing archetypes andGenericEnvironment
s in the AST.GenericEnvironment
after deserializing, and mapping them back to archetypes. This will eliminate a bunch of code for serializingGenericEnvironment
s and archetypes.GenericParamList
either. It comes up in a few places in the AST printer and code completion, but we might be able to get away with just printing the generic signature instead, assuming enough sugar is retained. All other usages can be converted to look atGenericSignature::getInnermostGenericParams()
instead.