Skip to content

Fix issue with 'Self' metadata when class conforms to protocol with default implementations #12174

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

Merged

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Sep 29, 2017

This builds upon #12118. Witness thunks for conformances of classes now have a generic parameter for Self, constrained to the class. If the witness is defined in a protocol extension, we pass through the Self parameter instead of using the static conforming type.

This means we now allow the following:

protocol P {
  init()
  static func f() -> Self
}

extension P {
  static func f() -> Self {
    return self.init()
  }
}

class C : P {
  required init() {}
}

Previously, we rejected this, to paper over the problem with passing Self metadata. However this was an unsatisfactory fix, because not only does it ban a useful pattern, it also means adding a new protocol requirement is source breaking, even when there is a default implementation.

Furthermore, even if your default implementation does not return Self, it was possible to observe the incorrect Self metadata, as was shown in https://bugs.swift.org/browse/SR-617.

Fixes rdar://problem/23671426, rdar://problem/33690383, https://bugs.swift.org/browse/SR-617.

@slavapestov slavapestov force-pushed the there-can-only-be-one-self branch 3 times, most recently from ac56212 to 0ca945d Compare October 6, 2017 05:50
@slavapestov slavapestov force-pushed the there-can-only-be-one-self branch 2 times, most recently from 123a72a to cb4e1d9 Compare October 7, 2017 09:58
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test compiler performance

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2017

!!! Couldn't read commit file !!!

@slavapestov
Copy link
Contributor Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2017

Build comment file:

Optimized (O)

No Changes (333)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 2955 2956 +0.0% 1.00x (?)
AnyHashableWithAClass 67335 67313 -0.0% 1.00x (?)
Array2D 1951 1939 -0.6% 1.01x (?)
ArrayAppend 1071 1071 +0.0% 1.00x
ArrayAppendArrayOfInt 599 598 -0.2% 1.00x (?)
ArrayAppendAscii 18942 18944 +0.0% 1.00x (?)
ArrayAppendFromGeneric 598 597 -0.2% 1.00x (?)
ArrayAppendGenericStructs 1219 1226 +0.6% 0.99x (?)
ArrayAppendLatin1 41698 40837 -2.1% 1.02x (?)
ArrayAppendLazyMap 923 922 -0.1% 1.00x (?)
ArrayAppendOptionals 1229 1239 +0.8% 0.99x (?)
ArrayAppendRepeatCol 998 998 +0.0% 1.00x
ArrayAppendReserved 832 831 -0.1% 1.00x (?)
ArrayAppendSequence 912 912 +0.0% 1.00x
ArrayAppendStrings 15097 15140 +0.3% 1.00x (?)
ArrayAppendToFromGeneric 598 598 +0.0% 1.00x
ArrayAppendToGeneric 598 597 -0.2% 1.00x (?)
ArrayAppendUTF16 41443 41462 +0.0% 1.00x (?)
ArrayInClass 62 61 -1.6% 1.02x (?)
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD 230 230 +0.0% 1.00x
ArrayOfGenericRef 3978 3979 +0.0% 1.00x (?)
ArrayOfPOD 176 176 +0.0% 1.00x
ArrayOfRef 3905 3909 +0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 597 599 +0.3% 1.00x (?)
ArrayPlusEqualFiveElementCollection 4791 4803 +0.3% 1.00x (?)
ArrayPlusEqualSingleElementCollection 1072 1072 +0.0% 1.00x
ArrayPlusEqualThreeElements 1684 1681 -0.2% 1.00x (?)
ArraySetElement 472 455 -3.6% 1.04x (?)
ArraySubscript 1481 1481 +0.0% 1.00x
ArrayValueProp 6 6 +0.0% 1.00x
ArrayValueProp2 6 6 +0.0% 1.00x
ArrayValueProp3 6 6 +0.0% 1.00x
ArrayValueProp4 6 6 +0.0% 1.00x
BitCount 148 147 -0.7% 1.01x (?)
ByteSwap 113 113 +0.0% 1.00x
CStringLongAscii 4683 4681 -0.0% 1.00x (?)
CStringLongNonAscii 2161 2160 -0.0% 1.00x (?)
CStringShortAscii 4826 4826 +0.0% 1.00x
Calculator 35 35 +0.0% 1.00x
CaptureProp 4599 4600 +0.0% 1.00x (?)
CharIndexing_ascii_unicodeScalars 13828 13827 -0.0% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 11068 11070 +0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars 10479 10479 +0.0% 1.00x
CharIndexing_chinese_unicodeScalars_Backwards 8401 8400 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 16553 16550 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 13241 13240 -0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars 13400 13400 +0.0% 1.00x
CharIndexing_korean_unicodeScalars_Backwards 10732 10729 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 2528 2530 +0.1% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2065 2065 +0.0% 1.00x
CharIndexing_punctuated_unicodeScalars 3164 3164 +0.0% 1.00x
CharIndexing_punctuated_unicodeScalars_Backwards 2564 2564 +0.0% 1.00x
CharIndexing_russian_unicodeScalars 11532 11533 +0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 9227 9229 +0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars 27235 27234 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 21799 21800 +0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars 80989 80981 -0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 60370 60360 -0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars 15817 15818 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 16373 16372 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 11980 11979 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 12396 12396 +0.0% 1.00x
CharIteration_japanese_unicodeScalars 18932 18933 +0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 19605 19606 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 15336 15336 +0.0% 1.00x
CharIteration_korean_unicodeScalars_Backwards 15873 15877 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 2865 2866 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2951 2951 +0.0% 1.00x
CharIteration_punctuated_unicodeScalars 3588 3587 -0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3698 3698 +0.0% 1.00x
CharIteration_russian_unicodeScalars 13181 13179 -0.0% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 13640 13639 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 31182 31180 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 32374 32375 +0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars 79741 79501 -0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 97632 97606 -0.0% 1.00x (?)
CharacterLiteralsLarge 5893 5896 +0.1% 1.00x (?)
CharacterLiteralsSmall 403 403 +0.0% 1.00x
Chars 428 428 +0.0% 1.00x
ClassArrayGetter 13 13 +0.0% 1.00x
DeadArray 181 181 +0.0% 1.00x
Dictionary 579 579 +0.0% 1.00x
Dictionary2 1890 1889 -0.1% 1.00x (?)
Dictionary2OfObjects 3292 3277 -0.5% 1.00x (?)
Dictionary3 471 471 +0.0% 1.00x
Dictionary3OfObjects 840 840 +0.0% 1.00x
DictionaryBridge 2552 2570 +0.7% 0.99x (?)
DictionaryGroup 276 276 +0.0% 1.00x
DictionaryGroupOfObjects 1792 1789 -0.2% 1.00x (?)
DictionaryLiteral 1468 1471 +0.2% 1.00x (?)
DictionaryOfObjects 2270 2273 +0.1% 1.00x (?)
DictionaryRemove 2457 2434 -0.9% 1.01x (?)
DictionaryRemoveOfObjects 23995 24319 +1.4% 0.99x (?)
DictionarySwap 414 414 +0.0% 1.00x
DictionarySwapOfObjects 7444 7433 -0.1% 1.00x (?)
DropFirstAnyCollection 55 55 +0.0% 1.00x
DropFirstAnyCollectionLazy 75517 75572 +0.1% 1.00x (?)
DropFirstAnySeqCRangeIter 27704 27695 -0.0% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 27676 27698 +0.1% 1.00x (?)
DropFirstAnySeqCntRange 50 50 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 50 50 +0.0% 1.00x
DropFirstAnySequence 6223 6227 +0.1% 1.00x (?)
DropFirstAnySequenceLazy 6220 6222 +0.0% 1.00x (?)
DropFirstArray 30 30 +0.0% 1.00x
DropFirstArrayLazy 30 30 +0.0% 1.00x
DropFirstCountableRange 18 18 +0.0% 1.00x
DropFirstCountableRangeLazy 18 18 +0.0% 1.00x
DropFirstSequence 2019 2019 +0.0% 1.00x
DropFirstSequenceLazy 1944 1944 +0.0% 1.00x
DropLastAnyCollection 21 21 +0.0% 1.00x
DropLastAnyCollectionLazy 25255 25185 -0.3% 1.00x (?)
DropLastAnySeqCRangeIter 4702 4702 +0.0% 1.00x
DropLastAnySeqCRangeIterLazy 4702 4702 +0.0% 1.00x
DropLastAnySeqCntRange 16 16 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 16 16 +0.0% 1.00x
DropLastAnySequence 6712 6712 +0.0% 1.00x
DropLastAnySequenceLazy 6656 6656 +0.0% 1.00x
DropLastArray 10 10 +0.0% 1.00x
DropLastArrayLazy 10 10 +0.0% 1.00x
DropLastCountableRange 6 6 +0.0% 1.00x
DropLastCountableRangeLazy 6 6 +0.0% 1.00x
DropLastSequence 607 607 +0.0% 1.00x
DropLastSequenceLazy 607 607 +0.0% 1.00x
DropWhileAnyCollection 68 68 +0.0% 1.00x
DropWhileAnyCollectionLazy 90 90 +0.0% 1.00x
DropWhileAnySeqCRangeIter 22334 22346 +0.1% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 88 88 +0.0% 1.00x
DropWhileAnySeqCntRange 63 63 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 88 89 +1.1% 0.99x (?)
DropWhileAnySequence 7285 7287 +0.0% 1.00x (?)
DropWhileAnySequenceLazy 1932 1933 +0.1% 1.00x (?)
DropWhileArray 43 43 +0.0% 1.00x
DropWhileArrayLazy 78 78 +0.0% 1.00x
DropWhileCountableRange 19 19 +0.0% 1.00x
DropWhileCountableRangeLazy 70 70 +0.0% 1.00x
DropWhileSequence 1624 1623 -0.1% 1.00x
DropWhileSequenceLazy 46 46 +0.0% 1.00x
EqualStringSubstring 388 388 +0.0% 1.00x
EqualSubstringString 388 389 +0.3% 1.00x (?)
EqualSubstringSubstring 389 389 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 391 391 +0.0% 1.00x
ErrorHandling 2041 2043 +0.1% 1.00x (?)
ExclusivityGlobal 3 3 +0.0% 1.00x
ExclusivityInMatSet 18 18 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1299 1291 -0.6% 1.01x (?)
FilterEvenUsingReduceInto 145 145 +0.0% 1.00x
FrequenciesUsingReduce 7367 7376 +0.1% 1.00x (?)
FrequenciesUsingReduceInto 4121 4130 +0.2% 1.00x (?)
Hanoi 3620 3627 +0.2% 1.00x (?)
HashTest 1630 1631 +0.1% 1.00x (?)
Histogram 282 279 -1.1% 1.01x (?)
Integrate 249 249 +0.0% 1.00x
IterateData 1376 1379 +0.2% 1.00x (?)
Join 376 376 +0.0% 1.00x
LazilyFilteredArrays 65450 65483 +0.1% 1.00x (?)
LazilyFilteredRange 3755 3754 -0.0% 1.00x (?)
LessSubstringSubstring 388 388 +0.0% 1.00x
LessSubstringSubstringGenericComparable 388 388 +0.0% 1.00x
LinkedList 7059 7058 -0.0% 1.00x (?)
MapReduce 361 361 +0.0% 1.00x
MapReduceAnyCollection 363 364 +0.3% 1.00x (?)
MapReduceAnyCollectionShort 2105 2105 +0.0% 1.00x
MapReduceClass 3061 3064 +0.1% 1.00x (?)
MapReduceClassShort 4549 4549 +0.0% 1.00x
MapReduceLazyCollection 12 12 +0.0% 1.00x
MapReduceLazyCollectionShort 36 36 +0.0% 1.00x
MapReduceLazySequence 90 90 +0.0% 1.00x
MapReduceSequence 439 440 +0.2% 1.00x (?)
MapReduceShort 1997 1997 +0.0% 1.00x
MapReduceShortString 21 21 +0.0% 1.00x
MapReduceString 103 103 +0.0% 1.00x
Memset 235 234 -0.4% 1.00x
MonteCarloE 10360 10359 -0.0% 1.00x (?)
MonteCarloPi 43965 43966 +0.0% 1.00x (?)
NSDictionaryCastToSwift 5534 5542 +0.1% 1.00x (?)
NSError 295 293 -0.7% 1.01x (?)
NSStringConversion 351 357 +1.7% 0.98x
NopDeinit 22903 22899 -0.0% 1.00x (?)
ObjectAllocation 180 180 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 22389 22403 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3454 3478 +0.7% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 39380 39459 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 33320 33711 +1.2% 0.99x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 121116 120753 -0.3% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5130 5137 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 91516 94589 +3.4% 0.97x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 98606 98931 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 64120 64090 -0.0% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4231 4234 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 67030 67112 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 68212 67706 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSString 987 986 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 1857 1859 +0.1% 1.00x (?)
ObjectiveCBridgeStubDataAppend 3782 3813 +0.8% 0.99x (?)
ObjectiveCBridgeStubDateAccess 181 181 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 272 272 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 24895 25036 +0.6% 0.99x (?)
ObjectiveCBridgeStubFromNSDate 3893 4035 +3.6% 0.96x (?)
ObjectiveCBridgeStubFromNSDateRef 4209 4235 +0.6% 0.99x (?)
ObjectiveCBridgeStubFromNSString 550 558 +1.5% 0.99x (?)
ObjectiveCBridgeStubFromNSStringRef 147 147 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2390 2367 -1.0% 1.01x (?)
ObjectiveCBridgeStubNSDateMutationRef 12545 12414 -1.0% 1.01x (?)
ObjectiveCBridgeStubNSDateRefAccess 338 338 +0.0% 1.00x
ObjectiveCBridgeStubToArrayOfNSString 28929 29163 +0.8% 0.99x (?)
ObjectiveCBridgeStubToNSDate 14943 15140 +1.3% 0.99x (?)
ObjectiveCBridgeStubToNSDateRef 3247 3214 -1.0% 1.01x (?)
ObjectiveCBridgeStubToNSString 1489 1492 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 116 116 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 210674 212175 +0.7% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef 215022 213083 -0.9% 1.01x (?)
ObjectiveCBridgeToNSArray 29132 29085 -0.2% 1.00x (?)
ObjectiveCBridgeToNSDictionary 44894 44867 -0.1% 1.00x (?)
ObjectiveCBridgeToNSSet 39347 39449 +0.3% 1.00x (?)
ObjectiveCBridgeToNSString 1270 1264 -0.5% 1.00x (?)
ObserverClosure 2317 2320 +0.1% 1.00x (?)
ObserverForwarderStruct 1137 1137 +0.0% 1.00x
ObserverPartiallyAppliedMethod 3784 3791 +0.2% 1.00x (?)
ObserverUnappliedMethod 2804 2807 +0.1% 1.00x (?)
OpenClose 3 3 +0.0% 1.00x
Phonebook 6181 6187 +0.1% 1.00x (?)
PolymorphicCalls 17 17 +0.0% 1.00x
PopFrontArray 1282 1281 -0.1% 1.00x (?)
PopFrontArrayGeneric 1282 1281 -0.1% 1.00x (?)
PopFrontUnsafePointer 6130 6130 +0.0% 1.00x
PrefixAnyCollection 55 55 +0.0% 1.00x
PrefixAnyCollectionLazy 75520 75539 +0.0% 1.00x (?)
PrefixAnySeqCRangeIter 21781 21783 +0.0% 1.00x (?)
PrefixAnySeqCRangeIterLazy 21768 21782 +0.1% 1.00x (?)
PrefixAnySeqCntRange 50 50 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 50 50 +0.0% 1.00x
PrefixAnySequence 5472 5470 -0.0% 1.00x (?)
PrefixAnySequenceLazy 5473 5470 -0.1% 1.00x (?)
PrefixArray 30 30 +0.0% 1.00x
PrefixArrayLazy 30 30 +0.0% 1.00x
PrefixCountableRange 18 18 +0.0% 1.00x
PrefixCountableRangeLazy 18 18 +0.0% 1.00x
PrefixSequence 1515 1515 +0.0% 1.00x
PrefixSequenceLazy 1459 1459 +0.0% 1.00x
PrefixWhileAnyCollection 93 93 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 66 66 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 12840 12849 +0.1% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 66 66 +0.0% 1.00x
PrefixWhileAnySeqCntRange 88 88 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 66 66 +0.0% 1.00x
PrefixWhileAnySequence 14302 14304 +0.0% 1.00x (?)
PrefixWhileAnySequenceLazy 1436 1436 +0.0% 1.00x
PrefixWhileArray 74 74 +0.0% 1.00x
PrefixWhileArrayLazy 37 37 +0.0% 1.00x
PrefixWhileCountableRange 29 29 +0.0% 1.00x
PrefixWhileCountableRangeLazy 18 18 +0.0% 1.00x
PrefixWhileSequence 333 334 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 28 28 +0.0% 1.00x
Prims 778 776 -0.3% 1.00x (?)
PrimsSplit 759 760 +0.1% 1.00x (?)
ProtocolDispatch 2727 2727 +0.0% 1.00x
ProtocolDispatch2 159 159 +0.0% 1.00x
RC4 157 157 +0.0% 1.00x
RGBHistogram 2172 2160 -0.6% 1.01x (?)
RGBHistogramOfObjects 23326 23341 +0.1% 1.00x (?)
RangeAssignment 349 348 -0.3% 1.00x (?)
RangeIterationSigned 134 134 +0.0% 1.00x
RangeIterationSigned64 134 135 +0.7% 0.99x (?)
RangeIterationUnsigned 151 151 +0.0% 1.00x
RecursiveOwnedParameter 2306 2305 -0.0% 1.00x (?)
ReversedArray 45 45 +0.0% 1.00x
ReversedBidirectional 29159 29069 -0.3% 1.00x (?)
ReversedDictionary 107 107 +0.0% 1.00x
SetExclusiveOr 2835 2829 -0.2% 1.00x (?)
SetExclusiveOr_OfObjects 8283 8304 +0.3% 1.00x (?)
SetIntersect 259 259 +0.0% 1.00x
SetIntersect_OfObjects 1706 1705 -0.1% 1.00x (?)
SetIsSubsetOf 290 290 +0.0% 1.00x
SetIsSubsetOf_OfObjects 360 360 +0.0% 1.00x
SetUnion 2515 2538 +0.9% 0.99x (?)
SetUnion_OfObjects 6933 6942 +0.1% 1.00x (?)
SevenBoom 1494 1476 -1.2% 1.01x (?)
Sim2DArray 348 348 +0.0% 1.00x
SortLargeExistentials 8415 8414 -0.0% 1.00x (?)
SortLettersInPlace 1140 1143 +0.3% 1.00x (?)
SortSortedStrings 904 904 +0.0% 1.00x
SortStrings 1707 1706 -0.1% 1.00x (?)
SortStringsUnicode 7872 7875 +0.0% 1.00x (?)
StackPromo 22630 22640 +0.0% 1.00x (?)
StaticArray 6 6 +0.0% 1.00x
StrComplexWalk 1587 1584 -0.2% 1.00x (?)
StrToInt 1851 1850 -0.1% 1.00x (?)
StringAdder 3489 3489 +0.0% 1.00x
StringBuilder 1007 1009 +0.2% 1.00x (?)
StringBuilderLong 941 941 +0.0% 1.00x
StringEdits 152456 152397 -0.0% 1.00x (?)
StringEnumRawValueInitialization 807 807 +0.0% 1.00x
StringEqualPointerComparison 363 363 +0.0% 1.00x
StringFromLongWholeSubstring 178 178 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 23 23 +0.0% 1.00x
StringHasPrefix 9 9 +0.0% 1.00x
StringHasPrefixUnicode 14913 14914 +0.0% 1.00x (?)
StringHasSuffix 9 9 +0.0% 1.00x
StringHasSuffixUnicode 61740 61720 -0.0% 1.00x (?)
StringInterpolation 10829 10818 -0.1% 1.00x (?)
StringMatch 7503 7503 +0.0% 1.00x
StringUTF16Builder 1852 1852 +0.0% 1.00x
StringWalk 1477 1476 -0.1% 1.00x (?)
StringWithCString 65205 66162 +1.5% 0.99x (?)
SubstringComparable 1612 1612 +0.0% 1.00x
SubstringEqualString 1435 1435 +0.0% 1.00x
SubstringEquatable 3698 3701 +0.1% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 62 62 +0.0% 1.00x
SuffixAnyCollection 20 20 +0.0% 1.00x
SuffixAnyCollectionLazy 25198 25210 +0.0% 1.00x (?)
SuffixAnySeqCRangeIter 5033 5032 -0.0% 1.00x (?)
SuffixAnySeqCRangeIterLazy 5033 5033 +0.0% 1.00x
SuffixAnySeqCntRange 16 16 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 16 16 +0.0% 1.00x
SuffixAnySequence 6696 6715 +0.3% 1.00x (?)
SuffixAnySequenceLazy 6676 6657 -0.3% 1.00x (?)
SuffixArray 10 10 +0.0% 1.00x
SuffixArrayLazy 10 10 +0.0% 1.00x
SuffixCountableRange 6 6 +0.0% 1.00x
SuffixCountableRangeLazy 6 6 +0.0% 1.00x
SuffixSequence 4667 4667 +0.0% 1.00x
SuffixSequenceLazy 4666 4666 +0.0% 1.00x
SumUsingReduce 97 97 +0.0% 1.00x
SumUsingReduceInto 97 97 +0.0% 1.00x
SuperChars 84838 84827 -0.0% 1.00x (?)
TwoSum 942 941 -0.1% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 257 257 +0.0% 1.00x
Walsh 402 402 +0.0% 1.00x
XorLoop 347 347 +0.0% 1.00x

Unoptimized (Onone)

Improvement (1)
TEST OLD NEW DELTA SPEEDUP
SevenBoom 1709 1610 -5.8% 1.06x (?)
No Changes (332)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4958 4970 +0.2% 1.00x (?)
AnyHashableWithAClass 84418 84516 +0.1% 1.00x (?)
Array2D 639160 638049 -0.2% 1.00x (?)
ArrayAppend 4074 4075 +0.0% 1.00x (?)
ArrayAppendArrayOfInt 655 655 +0.0% 1.00x
ArrayAppendAscii 52267 52251 -0.0% 1.00x (?)
ArrayAppendFromGeneric 658 658 +0.0% 1.00x
ArrayAppendGenericStructs 1311 1286 -1.9% 1.02x (?)
ArrayAppendLatin1 81065 81160 +0.1% 1.00x (?)
ArrayAppendLazyMap 227384 227364 -0.0% 1.00x (?)
ArrayAppendOptionals 1312 1325 +1.0% 0.99x (?)
ArrayAppendRepeatCol 227816 227887 +0.0% 1.00x (?)
ArrayAppendReserved 3825 3825 +0.0% 1.00x
ArrayAppendSequence 75542 75680 +0.2% 1.00x (?)
ArrayAppendStrings 15254 15216 -0.2% 1.00x (?)
ArrayAppendToFromGeneric 657 657 +0.0% 1.00x
ArrayAppendToGeneric 658 658 +0.0% 1.00x
ArrayAppendUTF16 77391 77487 +0.1% 1.00x (?)
ArrayInClass 6543 6544 +0.0% 1.00x (?)
ArrayLiteral 1800 1795 -0.3% 1.00x (?)
ArrayOfGenericPOD 1382 1381 -0.1% 1.00x (?)
ArrayOfGenericRef 10016 10017 +0.0% 1.00x (?)
ArrayOfPOD 792 792 +0.0% 1.00x
ArrayOfRef 9229 9236 +0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 656 657 +0.2% 1.00x (?)
ArrayPlusEqualFiveElementCollection 306341 308549 +0.7% 0.99x (?)
ArrayPlusEqualSingleElementCollection 303439 303149 -0.1% 1.00x (?)
ArrayPlusEqualThreeElements 11029 11135 +1.0% 0.99x (?)
ArraySetElement 4556 4555 -0.0% 1.00x (?)
ArraySubscript 85176 85244 +0.1% 1.00x (?)
ArrayValueProp 3609 3609 +0.0% 1.00x
ArrayValueProp2 19058 19057 -0.0% 1.00x (?)
ArrayValueProp3 4065 4068 +0.1% 1.00x (?)
ArrayValueProp4 4037 4040 +0.1% 1.00x (?)
BitCount 1578 1578 +0.0% 1.00x
ByteSwap 4028 4033 +0.1% 1.00x (?)
CStringLongAscii 4755 4771 +0.3% 1.00x (?)
CStringLongNonAscii 2417 2418 +0.0% 1.00x (?)
CStringShortAscii 8806 8807 +0.0% 1.00x (?)
Calculator 1153 1155 +0.2% 1.00x (?)
CaptureProp 124120 124097 -0.0% 1.00x (?)
CharIndexing_ascii_unicodeScalars 494246 491381 -0.6% 1.01x (?)
CharIndexing_ascii_unicodeScalars_Backwards 524335 522195 -0.4% 1.00x (?)
CharIndexing_chinese_unicodeScalars 370437 370611 +0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 394480 395305 +0.2% 1.00x (?)
CharIndexing_japanese_unicodeScalars 588933 591303 +0.4% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 627597 628340 +0.1% 1.00x (?)
CharIndexing_korean_unicodeScalars 477785 480212 +0.5% 0.99x (?)
CharIndexing_korean_unicodeScalars_Backwards 512205 506691 -1.1% 1.01x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 84981 84964 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 89807 90164 +0.4% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 107479 107518 +0.0% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 114213 114092 -0.1% 1.00x (?)
CharIndexing_russian_unicodeScalars 410683 410904 +0.1% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 435333 434646 -0.2% 1.00x (?)
CharIndexing_tweet_unicodeScalars 977056 973468 -0.4% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 1035866 1035754 -0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars 540529 539807 -0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 581735 580623 -0.2% 1.00x (?)
CharIteration_ascii_unicodeScalars 184800 184838 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 322545 322769 +0.1% 1.00x (?)
CharIteration_chinese_unicodeScalars 139584 139549 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 243581 243567 -0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars 221532 221576 +0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 387000 386424 -0.1% 1.00x (?)
CharIteration_korean_unicodeScalars 180004 179744 -0.1% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 313164 313402 +0.1% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 32945 32949 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 56562 56521 -0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars 41298 41300 +0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 71558 71568 +0.0% 1.00x (?)
CharIteration_russian_unicodeScalars 154093 154342 +0.2% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 267878 267730 -0.1% 1.00x (?)
CharIteration_tweet_unicodeScalars 365660 366125 +0.1% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 641071 639575 -0.2% 1.00x (?)
CharIteration_utf16_unicodeScalars 205478 205427 -0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 397596 398823 +0.3% 1.00x (?)
CharacterLiteralsLarge 6158 6176 +0.3% 1.00x (?)
CharacterLiteralsSmall 735 735 +0.0% 1.00x
Chars 50570 50574 +0.0% 1.00x (?)
ClassArrayGetter 1013 1012 -0.1% 1.00x (?)
DeadArray 114155 114115 -0.0% 1.00x (?)
Dictionary 3177 3120 -1.8% 1.02x (?)
Dictionary2 3564 3559 -0.1% 1.00x (?)
Dictionary2OfObjects 6035 6025 -0.2% 1.00x (?)
Dictionary3 1323 1324 +0.1% 1.00x (?)
Dictionary3OfObjects 2301 2302 +0.0% 1.00x (?)
DictionaryBridge 2640 2631 -0.3% 1.00x (?)
DictionaryGroup 5365 5368 +0.1% 1.00x (?)
DictionaryGroupOfObjects 8257 8247 -0.1% 1.00x (?)
DictionaryLiteral 8647 8647 +0.0% 1.00x
DictionaryOfObjects 6634 6598 -0.5% 1.01x (?)
DictionaryRemove 21526 21482 -0.2% 1.00x (?)
DictionaryRemoveOfObjects 59382 59672 +0.5% 1.00x (?)
DictionarySwap 5258 5258 +0.0% 1.00x
DictionarySwapOfObjects 23055 23079 +0.1% 1.00x (?)
DropFirstAnyCollection 20223 20229 +0.0% 1.00x (?)
DropFirstAnyCollectionLazy 139910 141028 +0.8% 0.99x (?)
DropFirstAnySeqCRangeIter 30311 30325 +0.0% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 30223 30384 +0.5% 0.99x
DropFirstAnySeqCntRange 20291 20289 -0.0% 1.00x (?)
DropFirstAnySeqCntRangeLazy 20006 20026 +0.1% 1.00x (?)
DropFirstAnySequence 15745 15743 -0.0% 1.00x (?)
DropFirstAnySequenceLazy 15735 15735 +0.0% 1.00x
DropFirstArray 6181 6183 +0.0% 1.00x (?)
DropFirstArrayLazy 44671 44688 +0.0% 1.00x (?)
DropFirstCountableRange 340 340 +0.0% 1.00x
DropFirstCountableRangeLazy 40016 39818 -0.5% 1.00x (?)
DropFirstSequence 14677 14667 -0.1% 1.00x (?)
DropFirstSequenceLazy 14681 14686 +0.0% 1.00x (?)
DropLastAnyCollection 6760 6761 +0.0% 1.00x (?)
DropLastAnyCollectionLazy 46573 47303 +1.6% 0.98x (?)
DropLastAnySeqCRangeIter 47024 46993 -0.1% 1.00x (?)
DropLastAnySeqCRangeIterLazy 46887 46883 -0.0% 1.00x (?)
DropLastAnySeqCntRange 6754 6754 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 6731 6727 -0.1% 1.00x (?)
DropLastAnySequence 33704 33710 +0.0% 1.00x (?)
DropLastAnySequenceLazy 33604 33612 +0.0% 1.00x (?)
DropLastArray 2069 2069 +0.0% 1.00x
DropLastArrayLazy 14899 14900 +0.0% 1.00x (?)
DropLastCountableRange 119 119 +0.0% 1.00x
DropLastCountableRangeLazy 13410 13409 -0.0% 1.00x (?)
DropLastSequence 33238 33235 -0.0% 1.00x (?)
DropLastSequenceLazy 33257 33206 -0.2% 1.00x (?)
DropWhileAnyCollection 26131 26132 +0.0% 1.00x (?)
DropWhileAnyCollectionLazy 28840 28531 -1.1% 1.01x (?)
DropWhileAnySeqCRangeIter 32931 32692 -0.7% 1.01x (?)
DropWhileAnySeqCRangeIterLazy 28636 28645 +0.0% 1.00x (?)
DropWhileAnySeqCntRange 26291 26289 -0.0% 1.00x (?)
DropWhileAnySeqCntRangeLazy 28464 28452 -0.0% 1.00x (?)
DropWhileAnySequence 18722 18716 -0.0% 1.00x (?)
DropWhileAnySequenceLazy 15010 15062 +0.3% 1.00x (?)
DropWhileArray 9994 9994 +0.0% 1.00x
DropWhileArrayLazy 17840 17845 +0.0% 1.00x (?)
DropWhileCountableRange 6435 6436 +0.0% 1.00x (?)
DropWhileCountableRangeLazy 27745 27777 +0.1% 1.00x (?)
DropWhileSequence 17618 17618 +0.0% 1.00x
DropWhileSequenceLazy 13725 13722 -0.0% 1.00x (?)
EqualStringSubstring 677 678 +0.1% 1.00x (?)
EqualSubstringString 675 674 -0.1% 1.00x (?)
EqualSubstringSubstring 791 791 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 422 422 +0.0% 1.00x
ErrorHandling 6828 6844 +0.2% 1.00x (?)
ExclusivityGlobal 172 172 +0.0% 1.00x
ExclusivityInMatSet 303 303 +0.0% 1.00x
ExclusivityIndependent 124 124 +0.0% 1.00x
FilterEvenUsingReduce 4447 4450 +0.1% 1.00x (?)
FilterEvenUsingReduceInto 2621 2620 -0.0% 1.00x (?)
FrequenciesUsingReduce 16090 15955 -0.8% 1.01x (?)
FrequenciesUsingReduceInto 8875 8900 +0.3% 1.00x (?)
Hanoi 19139 19142 +0.0% 1.00x (?)
HashTest 17333 17364 +0.2% 1.00x (?)
Histogram 9016 8895 -1.3% 1.01x (?)
Integrate 677 677 +0.0% 1.00x
IterateData 13424 13443 +0.1% 1.00x (?)
Join 1503 1502 -0.1% 1.00x (?)
LazilyFilteredArrays 1729686 1737101 +0.4% 1.00x (?)
LazilyFilteredRange 743314 743286 -0.0% 1.00x (?)
LessSubstringSubstring 792 792 +0.0% 1.00x
LessSubstringSubstringGenericComparable 443 442 -0.2% 1.00x
LinkedList 40342 40337 -0.0% 1.00x (?)
MapReduce 38608 38715 +0.3% 1.00x (?)
MapReduceAnyCollection 38956 38968 +0.0% 1.00x (?)
MapReduceAnyCollectionShort 52810 52804 -0.0% 1.00x (?)
MapReduceClass 43951 43948 -0.0% 1.00x (?)
MapReduceClassShort 55360 55203 -0.3% 1.00x (?)
MapReduceLazyCollection 37240 37245 +0.0% 1.00x (?)
MapReduceLazyCollectionShort 46576 47197 +1.3% 0.99x (?)
MapReduceLazySequence 29890 29895 +0.0% 1.00x (?)
MapReduceSequence 45156 45164 +0.0% 1.00x (?)
MapReduceShort 50964 51103 +0.3% 1.00x (?)
MapReduceShortString 283 286 +1.1% 0.99x (?)
MapReduceString 2665 2663 -0.1% 1.00x (?)
Memset 45180 45179 -0.0% 1.00x (?)
MonteCarloE 945423 947765 +0.2% 1.00x (?)
MonteCarloPi 4045949 4047986 +0.1% 1.00x (?)
NSDictionaryCastToSwift 6442 6461 +0.3% 1.00x (?)
NSError 731 728 -0.4% 1.00x (?)
NSStringConversion 412 412 +0.0% 1.00x
NopDeinit 171268 170906 -0.2% 1.00x (?)
ObjectAllocation 1459 1455 -0.3% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 24395 24977 +2.4% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6745 6760 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 41252 41947 +1.7% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 34812 34844 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 123611 122034 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7448 7454 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 99997 100365 +0.4% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 105620 100844 -4.5% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObject 69150 68454 -1.0% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7396 7419 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 73347 73261 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 73230 73140 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSString 3991 4005 +0.4% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2220 2216 -0.2% 1.00x
ObjectiveCBridgeStubDataAppend 4367 4392 +0.6% 0.99x (?)
ObjectiveCBridgeStubDateAccess 1031 1030 -0.1% 1.00x
ObjectiveCBridgeStubDateMutation 515 515 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 25313 25233 -0.3% 1.00x (?)
ObjectiveCBridgeStubFromNSDate 4093 4110 +0.4% 1.00x (?)
ObjectiveCBridgeStubFromNSDateRef 4368 4367 -0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSString 579 582 +0.5% 0.99x (?)
ObjectiveCBridgeStubFromNSStringRef 175 175 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2804 2745 -2.1% 1.02x (?)
ObjectiveCBridgeStubNSDateMutationRef 16554 16420 -0.8% 1.01x (?)
ObjectiveCBridgeStubNSDateRefAccess 1215 1213 -0.2% 1.00x (?)
ObjectiveCBridgeStubToArrayOfNSString 29391 29440 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSDate 15046 15011 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3623 3560 -1.7% 1.02x (?)
ObjectiveCBridgeStubToNSString 1558 1555 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 148 148 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 215375 219203 +1.8% 0.98x (?)
ObjectiveCBridgeStubURLAppendPathRef 214553 221360 +3.2% 0.97x (?)
ObjectiveCBridgeToNSArray 29074 29312 +0.8% 0.99x (?)
ObjectiveCBridgeToNSDictionary 45891 45754 -0.3% 1.00x (?)
ObjectiveCBridgeToNSSet 39916 40234 +0.8% 0.99x (?)
ObjectiveCBridgeToNSString 1302 1302 +0.0% 1.00x
ObserverClosure 7120 7125 +0.1% 1.00x (?)
ObserverForwarderStruct 5100 5097 -0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 8588 8596 +0.1% 1.00x (?)
ObserverUnappliedMethod 8894 8944 +0.6% 0.99x (?)
OpenClose 392 392 +0.0% 1.00x
Phonebook 21572 21583 +0.1% 1.00x (?)
PolymorphicCalls 5139 5134 -0.1% 1.00x (?)
PopFrontArray 10258 10258 +0.0% 1.00x
PopFrontArrayGeneric 9217 9212 -0.1% 1.00x (?)
PopFrontUnsafePointer 7768 7740 -0.4% 1.00x (?)
PrefixAnyCollection 20208 20206 -0.0% 1.00x (?)
PrefixAnyCollectionLazy 141183 139410 -1.3% 1.01x (?)
PrefixAnySeqCRangeIter 24196 24220 +0.1% 1.00x (?)
PrefixAnySeqCRangeIterLazy 24234 24236 +0.0% 1.00x (?)
PrefixAnySeqCntRange 20264 20262 -0.0% 1.00x (?)
PrefixAnySeqCntRangeLazy 19991 19990 -0.0% 1.00x (?)
PrefixAnySequence 12879 12877 -0.0% 1.00x (?)
PrefixAnySequenceLazy 12835 12840 +0.0% 1.00x (?)
PrefixArray 6194 6194 +0.0% 1.00x
PrefixArrayLazy 44633 44607 -0.1% 1.00x (?)
PrefixCountableRange 340 340 +0.0% 1.00x
PrefixCountableRangeLazy 40030 39934 -0.2% 1.00x (?)
PrefixSequence 11778 11814 +0.3% 1.00x (?)
PrefixSequenceLazy 11780 11780 +0.0% 1.00x
PrefixWhileAnyCollection 38225 38228 +0.0% 1.00x (?)
PrefixWhileAnyCollectionLazy 23290 23288 -0.0% 1.00x (?)
PrefixWhileAnySeqCRangeIter 42818 42816 -0.0% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 23472 23478 +0.0% 1.00x (?)
PrefixWhileAnySeqCntRange 38860 38852 -0.0% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 23324 23326 +0.0% 1.00x (?)
PrefixWhileAnySequence 32770 32825 +0.2% 1.00x (?)
PrefixWhileAnySequenceLazy 13331 13327 -0.0% 1.00x (?)
PrefixWhileArray 17289 17288 -0.0% 1.00x (?)
PrefixWhileArrayLazy 15376 15377 +0.0% 1.00x (?)
PrefixWhileCountableRange 18477 18475 -0.0% 1.00x (?)
PrefixWhileCountableRangeLazy 22733 22726 -0.0% 1.00x (?)
PrefixWhileSequence 31630 31633 +0.0% 1.00x (?)
PrefixWhileSequenceLazy 12382 12406 +0.2% 1.00x (?)
Prims 10557 10556 -0.0% 1.00x (?)
PrimsSplit 10586 10552 -0.3% 1.00x (?)
ProtocolDispatch 7882 7880 -0.0% 1.00x (?)
ProtocolDispatch2 499 499 +0.0% 1.00x
RC4 18944 18954 +0.1% 1.00x (?)
RGBHistogram 34497 34612 +0.3% 1.00x (?)
RGBHistogramOfObjects 105909 105760 -0.1% 1.00x (?)
RangeAssignment 5757 5762 +0.1% 1.00x (?)
RangeIterationSigned 17775 17813 +0.2% 1.00x (?)
RangeIterationSigned64 51546 51542 -0.0% 1.00x (?)
RangeIterationUnsigned 46892 46873 -0.0% 1.00x (?)
RecursiveOwnedParameter 11062 11059 -0.0% 1.00x (?)
ReversedArray 44410 44300 -0.2% 1.00x (?)
ReversedBidirectional 74973 74850 -0.2% 1.00x (?)
ReversedDictionary 29391 29395 +0.0% 1.00x (?)
SetExclusiveOr 23216 23227 +0.0% 1.00x (?)
SetExclusiveOr_OfObjects 48137 48094 -0.1% 1.00x (?)
SetIntersect 12781 12779 -0.0% 1.00x (?)
SetIntersect_OfObjects 12581 12583 +0.0% 1.00x (?)
SetIsSubsetOf 1938 1937 -0.1% 1.00x (?)
SetIsSubsetOf_OfObjects 1570 1570 +0.0% 1.00x
SetUnion 11863 11854 -0.1% 1.00x (?)
SetUnion_OfObjects 33570 33582 +0.0% 1.00x (?)
Sim2DArray 44269 44268 -0.0% 1.00x (?)
SortLargeExistentials 17502 17509 +0.0% 1.00x (?)
SortLettersInPlace 3034 3026 -0.3% 1.00x (?)
SortSortedStrings 1455 1455 +0.0% 1.00x
SortStrings 2676 2676 +0.0% 1.00x
SortStringsUnicode 9185 9182 -0.0% 1.00x (?)
StackPromo 103465 103406 -0.1% 1.00x (?)
StaticArray 4741 4733 -0.2% 1.00x (?)
StrComplexWalk 6975 6979 +0.1% 1.00x (?)
StrToInt 126500 126505 +0.0% 1.00x (?)
StringAdder 3783 3774 -0.2% 1.00x (?)
StringBuilder 7157 7144 -0.2% 1.00x (?)
StringBuilderLong 1109 1108 -0.1% 1.00x (?)
StringEdits 381696 381042 -0.2% 1.00x (?)
StringEnumRawValueInitialization 12646 12594 -0.4% 1.00x (?)
StringEqualPointerComparison 2716 2717 +0.0% 1.00x (?)
StringFromLongWholeSubstring 212 212 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 216 216 +0.0% 1.00x
StringHasPrefix 1914 1906 -0.4% 1.00x (?)
StringHasPrefixUnicode 16375 16336 -0.2% 1.00x (?)
StringHasSuffix 1903 1897 -0.3% 1.00x (?)
StringHasSuffixUnicode 63626 63608 -0.0% 1.00x (?)
StringInterpolation 13883 13886 +0.0% 1.00x (?)
StringMatch 34733 34744 +0.0% 1.00x (?)
StringUTF16Builder 8137 8057 -1.0% 1.01x
StringWalk 12038 12048 +0.1% 1.00x (?)
StringWithCString 57236 57165 -0.1% 1.00x (?)
SubstringComparable 4321 4324 +0.1% 1.00x (?)
SubstringEqualString 6535 6517 -0.3% 1.00x (?)
SubstringEquatable 8477 8478 +0.0% 1.00x (?)
SubstringFromLongString 17 17 +0.0% 1.00x
SubstringFromLongStringGeneric 115 115 +0.0% 1.00x
SuffixAnyCollection 6753 6752 -0.0% 1.00x (?)
SuffixAnyCollectionLazy 46525 46661 +0.3% 1.00x (?)
SuffixAnySeqCRangeIter 44428 44360 -0.2% 1.00x (?)
SuffixAnySeqCRangeIterLazy 44496 44482 -0.0% 1.00x (?)
SuffixAnySeqCntRange 6749 6750 +0.0% 1.00x (?)
SuffixAnySeqCntRangeLazy 6737 6731 -0.1% 1.00x (?)
SuffixAnySequence 31178 31179 +0.0% 1.00x (?)
SuffixAnySequenceLazy 31206 31218 +0.0% 1.00x (?)
SuffixArray 2068 2068 +0.0% 1.00x
SuffixArrayLazy 14880 14882 +0.0% 1.00x (?)
SuffixCountableRange 119 119 +0.0% 1.00x
SuffixCountableRangeLazy 13446 13376 -0.5% 1.01x (?)
SuffixSequence 30784 30841 +0.2% 1.00x (?)
SuffixSequenceLazy 30866 30814 -0.2% 1.00x (?)
SumUsingReduce 231819 231822 +0.0% 1.00x (?)
SumUsingReduceInto 225316 225383 +0.0% 1.00x (?)
SuperChars 191583 191420 -0.1% 1.00x (?)
TwoSum 4366 4360 -0.1% 1.00x (?)
TypeFlood 168 168 +0.0% 1.00x
UTF8Decode 38155 38152 -0.0% 1.00x (?)
Walsh 12127 12138 +0.1% 1.00x (?)
XorLoop 23559 23558 -0.0% 1.00x (?)
Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini7,1
  Processor Name: Intel Core i5
  Processor Speed: 2.8 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 3 MB
  Memory: 16 GB

@slavapestov
Copy link
Contributor Author

@graydon "Test compiler performance" failure you might want to look at

At this point, we already have a witness, so the requirement
environment can depend on the witness as well as the requirement.

Then, store the RequirementEnvironment inside the RequirementMatch.
…s conformances have an abstract 'Self'

Consider the following code:

protocol P {
  func foo<A>(_: A)
}

extension P {
  func foo<A>(_: A) {}
}

class C<T> : P {}

Before, the witness thunk for [C : P].foo() had the generic signature
<T, A>, and the witness P.foo() was called with a substitution
Self := C<T>.

This is incorrect because the caller might be using a subclass of C
as the 'Self' type, but this was being erased.

Now, the witness thunk for [C : P].foo() has the generic signature
<X : C<T>, T, A>, and the witness P.foo() is called with the
substitution Self := X.

Fixes <rdar://problem/33690383>, <https://bugs.swift.org/browse/SR-617>.
@slavapestov slavapestov force-pushed the there-can-only-be-one-self branch 2 times, most recently from 974889b to 0f5f272 Compare October 9, 2017 06:38
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 9, 2017

Build failed
Swift Test OS X Platform
Git Sha - 3c982b30ff9ff7bca996ed1d0d631eb8d3203af9

…t implementations returning 'Self'

Now that we pass in the correct type metadata for 'Self', it is
sound for a class to conform to a protocol with a default implementation
for a method returning 'Self'.

Fixes <rdar://problem/23671426>.
@swift-ci
Copy link
Contributor

swift-ci commented Oct 9, 2017

Build failed
Swift Test OS X Platform
Git Sha - 0f5f27293335e63c1370f71486adda322370fd0a

@slavapestov slavapestov force-pushed the there-can-only-be-one-self branch from 0f5f272 to f8b06dc Compare October 9, 2017 07:53
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 5618553 into swiftlang:master Oct 9, 2017
@jrose-apple
Copy link
Contributor

This broke the simulator, reverting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants