Skip to content

[string] ARC hack around hashValue #14118

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
merged 1 commit into from
Jan 24, 2018

Conversation

milseman
Copy link
Member

Avoid a source of ARC for hashValue, which is perf-sensitive
especially for hashed collection growth.

This improves the Dictionary benchmark by around 30%.

Avoid a source of ARC for hashValue, which is perf-sensitive
especially for hashed collection growth.

This improves the Dictionary benchmark by around 30%.
@milseman
Copy link
Member Author

@swift-ci please test

@milseman
Copy link
Member Author

@swift-ci please smoke benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (13)
TEST OLD NEW DELTA SPEEDUP
Sim2DArray 409 636 +55.5% 0.64x
ObjectiveCBridgeFromNSStringForced 2513 3165 +25.9% 0.79x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4199 5041 +20.1% 0.83x (?)
StaticArray 5 6 +20.0% 0.83x
SuffixCountableRange 11 12 +9.1% 0.92x
ObjectiveCBridgeStubURLAppendPath 331972 360102 +8.5% 0.92x (?)
DropLastSequenceLazy 688 742 +7.8% 0.93x
DropLastSequence 688 742 +7.8% 0.93x
ObjectiveCBridgeFromNSSetAnyObject 60199 64631 +7.4% 0.93x (?)
StringWordBuilderReservingCapacity 1244 1325 +6.5% 0.94x
ObjectiveCBridgeFromNSDictionaryAnyObject 129217 137608 +6.5% 0.94x (?)
ObjectiveCBridgeStubDataAppend 4191 4461 +6.4% 0.94x
StringWordBuilder 1599 1697 +6.1% 0.94x
Improvement (19)
TEST OLD NEW DELTA SPEEDUP
Dictionary3 565 231 -59.1% 2.45x
Dictionary 755 498 -34.0% 1.52x
WordCountUniqueASCII 2550 1757 -31.1% 1.45x
Dictionary3OfObjects 899 641 -28.7% 1.40x
StringEnumRawValueInitialization 1324 998 -24.6% 1.33x
Dictionary2 1921 1574 -18.1% 1.22x
DictionaryOfObjects 2422 2079 -14.2% 1.16x
Dictionary2OfObjects 3285 2861 -12.9% 1.15x
ObjectiveCBridgeFromNSSetAnyObjectForced 5093 4555 -10.6% 1.12x
StringEdits 142353 129262 -9.2% 1.10x
WordCountHistogramASCII 8740 7958 -8.9% 1.10x
SuffixCountableRangeLazy 12 11 -8.3% 1.09x
ObjectiveCBridgeFromNSSetAnyObjectToString 82711 76470 -7.5% 1.08x
DictOfArraysToArrayOfDicts 850 787 -7.4% 1.08x
WordSplitUTF16 23345 21998 -5.8% 1.06x
ObjectiveCBridgeToNSString 1289 1220 -5.4% 1.06x
CharacterLiteralsLarge 6067 5751 -5.2% 1.05x
DropFirstAnyCollectionLazy 67809 64398 -5.0% 1.05x
ObjectiveCBridgeFromNSArrayAnyObject 23267 22159 -4.8% 1.05x
No Changes (326)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3603 3468 -3.7% 1.04x
AnyHashableWithAClass 70702 70331 -0.5% 1.01x (?)
Array2D 2522 2519 -0.1% 1.00x (?)
ArrayAppend 975 979 +0.4% 1.00x
ArrayAppendArrayOfInt 744 742 -0.3% 1.00x (?)
ArrayAppendAscii 13636 13655 +0.1% 1.00x
ArrayAppendFromGeneric 746 743 -0.4% 1.00x (?)
ArrayAppendGenericStructs 1357 1357 +0.0% 1.00x
ArrayAppendLatin1 38375 38427 +0.1% 1.00x
ArrayAppendLazyMap 1288 1287 -0.1% 1.00x (?)
ArrayAppendOptionals 1357 1358 +0.1% 1.00x (?)
ArrayAppendRepeatCol 1286 1284 -0.2% 1.00x
ArrayAppendReserved 725 726 +0.1% 1.00x
ArrayAppendSequence 1078 1082 +0.4% 1.00x (?)
ArrayAppendStrings 15122 15153 +0.2% 1.00x (?)
ArrayAppendToFromGeneric 743 743 +0.0% 1.00x
ArrayAppendToGeneric 743 744 +0.1% 1.00x (?)
ArrayAppendUTF16 37669 37987 +0.8% 0.99x
ArrayInClass 85 86 +1.2% 0.99x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 146 146 +0.0% 1.00x
ArrayOfGenericRef 4231 4239 +0.2% 1.00x
ArrayOfPOD 178 177 -0.6% 1.01x
ArrayOfRef 4221 4210 -0.3% 1.00x (?)
ArrayPlusEqualArrayOfInt 742 744 +0.3% 1.00x
ArrayPlusEqualFiveElementCollection 5604 5610 +0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 982 984 +0.2% 1.00x (?)
ArrayPlusEqualThreeElements 1572 1573 +0.1% 1.00x (?)
ArraySubscript 1513 1491 -1.5% 1.01x
ArrayValueProp 8 8 +0.0% 1.00x
ArrayValueProp2 8 8 +0.0% 1.00x
ArrayValueProp3 8 8 +0.0% 1.00x
ArrayValueProp4 8 8 +0.0% 1.00x
BinaryFloatingPointConversionFromBinaryInteger 48 49 +2.1% 0.98x
BitCount 202 211 +4.5% 0.96x
ByteSwap 101 100 -1.0% 1.01x (?)
COWTree 3428 3456 +0.8% 0.99x (?)
CSVParsing 889499 889022 -0.1% 1.00x (?)
CSVParsingAlt 718608 716569 -0.3% 1.00x (?)
CSVParsingAltIndices 356919 350522 -1.8% 1.02x (?)
CStringLongAscii 5101 5089 -0.2% 1.00x
CStringLongNonAscii 2158 2147 -0.5% 1.01x
CStringShortAscii 4735 4642 -2.0% 1.02x (?)
Calculator 431 441 +2.3% 0.98x (?)
CaptureProp 8015 7744 -3.4% 1.03x
CharIndexing_ascii_unicodeScalars 17775 17766 -0.1% 1.00x
CharIndexing_ascii_unicodeScalars_Backwards 15972 15969 -0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars 13461 13458 -0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12101 12097 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 21275 21276 +0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 19119 19117 -0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars 17230 17232 +0.0% 1.00x
CharIndexing_korean_unicodeScalars_Backwards 15492 15496 +0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 3209 3206 -0.1% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2904 2904 +0.0% 1.00x
CharIndexing_punctuated_unicodeScalars 4018 4014 -0.1% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3629 3631 +0.1% 1.00x (?)
CharIndexing_russian_unicodeScalars 14801 14797 -0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 13307 13309 +0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars 35407 35404 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31571 31558 -0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars 25248 25310 +0.2% 1.00x
CharIndexing_utf16_unicodeScalars_Backwards 25454 25468 +0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars 20553 20838 +1.4% 0.99x
CharIteration_ascii_unicodeScalars_Backwards 14108 14113 +0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 15603 15745 +0.9% 0.99x
CharIteration_chinese_unicodeScalars_Backwards 10697 10696 -0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars 24576 24954 +1.5% 0.98x
CharIteration_japanese_unicodeScalars_Backwards 16886 16885 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 19941 20224 +1.4% 0.99x
CharIteration_korean_unicodeScalars_Backwards 13694 13691 -0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3679 3713 +0.9% 0.99x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2593 2596 +0.1% 1.00x
CharIteration_punctuated_unicodeScalars 4596 4648 +1.1% 0.99x
CharIteration_punctuated_unicodeScalars_Backwards 3228 3230 +0.1% 1.00x
CharIteration_russian_unicodeScalars 17151 17322 +1.0% 0.99x
CharIteration_russian_unicodeScalars_Backwards 11767 11763 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 40712 41087 +0.9% 0.99x
CharIteration_tweet_unicodeScalars_Backwards 27844 27839 -0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars 26951 26921 -0.1% 1.00x
CharIteration_utf16_unicodeScalars_Backwards 17269 17266 -0.0% 1.00x (?)
CharacterLiteralsSmall 422 411 -2.6% 1.03x
CharacterPropertiesFetch 4374 4385 +0.3% 1.00x (?)
CharacterPropertiesPrecomputed 965 964 -0.1% 1.00x (?)
CharacterPropertiesStashed 1540 1557 +1.1% 0.99x
CharacterPropertiesStashedMemo 1528 1525 -0.2% 1.00x
Chars 962 966 +0.4% 1.00x
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 436 437 +0.2% 1.00x (?)
DictionaryBridge 2178 2102 -3.5% 1.04x (?)
DictionaryGroup 142 142 +0.0% 1.00x
DictionaryGroupOfObjects 1811 1804 -0.4% 1.00x (?)
DictionaryLiteral 1487 1497 +0.7% 0.99x
DictionaryRemove 2777 2884 +3.9% 0.96x
DictionaryRemoveOfObjects 22652 23163 +2.3% 0.98x
DictionarySubscriptDefaultMutation 155 155 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 489 488 -0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 3638 3636 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1321 1344 +1.7% 0.98x (?)
DictionarySwap 517 517 +0.0% 1.00x
DictionarySwapOfObjects 7104 7215 +1.6% 0.98x (?)
DoubleWidthDivision 286 282 -1.4% 1.01x
DropFirstAnyCollection 75 76 +1.3% 0.99x
DropFirstAnySeqCRangeIter 19003 19070 +0.4% 1.00x
DropFirstAnySeqCRangeIterLazy 18974 19045 +0.4% 1.00x (?)
DropFirstAnySeqCntRange 71 71 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 71 71 +0.0% 1.00x
DropFirstAnySequence 4235 4242 +0.2% 1.00x
DropFirstAnySequenceLazy 4235 4241 +0.1% 1.00x (?)
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2620 2621 +0.0% 1.00x (?)
DropFirstSequenceLazy 2714 2714 +0.0% 1.00x
DropLastAnyCollection 27 28 +3.7% 0.96x
DropLastAnyCollectionLazy 21876 21829 -0.2% 1.00x (?)
DropLastAnySeqCRangeIter 3506 3525 +0.5% 0.99x
DropLastAnySeqCRangeIterLazy 3513 3511 -0.1% 1.00x (?)
DropLastAnySeqCntRange 23 23 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 23 23 +0.0% 1.00x
DropLastAnySequence 5108 5103 -0.1% 1.00x
DropLastAnySequenceLazy 5196 5181 -0.3% 1.00x
DropLastCountableRange 11 11 +0.0% 1.00x
DropLastCountableRangeLazy 11 11 +0.0% 1.00x
DropWhileAnyCollection 99 99 +0.0% 1.00x
DropWhileAnyCollectionLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCRangeIter 15444 15467 +0.1% 1.00x
DropWhileAnySeqCRangeIterLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 147 147 +0.0% 1.00x
DropWhileAnySequence 4660 4677 +0.4% 1.00x
DropWhileAnySequenceLazy 1831 1831 +0.0% 1.00x
DropWhileArrayLazy 129 129 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 111 111 +0.0% 1.00x
DropWhileSequence 1321 1322 +0.1% 1.00x (?)
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 420 420 +0.0% 1.00x
EqualSubstringString 421 421 +0.0% 1.00x
EqualSubstringSubstring 421 421 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 420 420 +0.0% 1.00x
ErrorHandling 2369 2361 -0.3% 1.00x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1293 1293 +0.0% 1.00x
FilterEvenUsingReduceInto 147 146 -0.7% 1.01x (?)
FrequenciesUsingReduce 6762 6696 -1.0% 1.01x
FrequenciesUsingReduceInto 3205 3077 -4.0% 1.04x
Hanoi 3539 3532 -0.2% 1.00x
HashTest 1774 1774 +0.0% 1.00x
Histogram 358 358 +0.0% 1.00x
Integrate 217 217 +0.0% 1.00x
IterateData 1337 1288 -3.7% 1.04x
Join 357 355 -0.6% 1.01x
LazilyFilteredArrayContains 31878 31888 +0.0% 1.00x (?)
LazilyFilteredArrays 65935 65798 -0.2% 1.00x (?)
LazilyFilteredRange 3810 3809 -0.0% 1.00x (?)
LessSubstringSubstring 420 420 +0.0% 1.00x
LessSubstringSubstringGenericComparable 420 419 -0.2% 1.00x
LinkedList 7126 7126 +0.0% 1.00x
LuhnAlgoEager 564 563 -0.2% 1.00x (?)
LuhnAlgoLazy 566 566 +0.0% 1.00x
MapReduce 457 455 -0.4% 1.00x
MapReduceAnyCollection 429 429 +0.0% 1.00x
MapReduceAnyCollectionShort 2007 2050 +2.1% 0.98x (?)
MapReduceClass 3015 3013 -0.1% 1.00x (?)
MapReduceClassShort 4493 4489 -0.1% 1.00x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 441 441 +0.0% 1.00x
MapReduceShort 1975 1970 -0.3% 1.00x
MapReduceShortString 20 21 +5.0% 0.95x
MapReduceString 85 85 +0.0% 1.00x
Memset 217 215 -0.9% 1.01x (?)
MonteCarloE 10423 10344 -0.8% 1.01x
MonteCarloPi 42873 43074 +0.5% 1.00x
NSDictionaryCastToSwift 5223 5389 +3.2% 0.97x (?)
NSError 296 297 +0.3% 1.00x
NSStringConversion 340 335 -1.5% 1.01x
NibbleSort 4172 4117 -1.3% 1.01x
NopDeinit 23037 23264 +1.0% 0.99x
ObjectAllocation 175 175 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 41286 40918 -0.9% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 35725 36867 +3.2% 0.97x (?)
ObjectiveCBridgeFromNSString 1395 1386 -0.6% 1.01x
ObjectiveCBridgeStubDateMutation 257 256 -0.4% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 28983 29724 +2.6% 0.98x (?)
ObjectiveCBridgeStubFromNSDate 4073 3958 -2.8% 1.03x
ObjectiveCBridgeStubFromNSString 908 868 -4.4% 1.05x
ObjectiveCBridgeStubFromNSStringRef 167 167 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2637 2629 -0.3% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 13141 12990 -1.1% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString 28943 28846 -0.3% 1.00x (?)
ObjectiveCBridgeStubToNSDate 14436 15125 +4.8% 0.95x (?)
ObjectiveCBridgeStubToNSDateRef 3322 3393 +2.1% 0.98x (?)
ObjectiveCBridgeStubToNSString 1446 1446 +0.0% 1.00x
ObjectiveCBridgeStubToNSStringRef 121 121 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPathRef 344765 353500 +2.5% 0.98x (?)
ObjectiveCBridgeToNSArray 29048 28579 -1.6% 1.02x (?)
ObjectiveCBridgeToNSDictionary 63907 64783 +1.4% 0.99x (?)
ObjectiveCBridgeToNSSet 51842 52514 +1.3% 0.99x (?)
ObserverClosure 2003 1983 -1.0% 1.01x
ObserverForwarderStruct 1080 1080 +0.0% 1.00x
ObserverPartiallyAppliedMethod 3477 3438 -1.1% 1.01x
ObserverUnappliedMethod 2138 2143 +0.2% 1.00x (?)
OpenClose 257 254 -1.2% 1.01x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 4054 4051 -0.1% 1.00x (?)
PointerArithmetics 31488 31492 +0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1893 1896 +0.2% 1.00x
PopFrontArrayGeneric 1863 1864 +0.1% 1.00x (?)
PopFrontUnsafePointer 8986 8874 -1.2% 1.01x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnyCollectionLazy 64818 64569 -0.4% 1.00x (?)
PrefixAnySeqCRangeIter 14752 14868 +0.8% 0.99x
PrefixAnySeqCRangeIterLazy 14754 14865 +0.8% 0.99x
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 3676 3678 +0.1% 1.00x (?)
PrefixAnySequenceLazy 3675 3676 +0.0% 1.00x (?)
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 1307 1307 +0.0% 1.00x
PrefixSequenceLazy 1377 1377 +0.0% 1.00x
PrefixWhileAnyCollection 146 146 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 106 106 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 9439 9454 +0.2% 1.00x
PrefixWhileAnySeqCRangeIterLazy 106 106 +0.0% 1.00x
PrefixWhileAnySeqCntRange 141 141 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 106 106 +0.0% 1.00x
PrefixWhileAnySequence 10507 10454 -0.5% 1.01x
PrefixWhileAnySequenceLazy 1374 1373 -0.1% 1.00x (?)
PrefixWhileArray 105 105 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 46 46 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 391 390 -0.3% 1.00x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 764 763 -0.1% 1.00x (?)
PrimsSplit 766 763 -0.4% 1.00x (?)
RC4 165 166 +0.6% 0.99x
RGBHistogram 2899 2908 +0.3% 1.00x (?)
RGBHistogramOfObjects 22723 22740 +0.1% 1.00x (?)
RangeAssignment 379 378 -0.3% 1.00x
RangeIterationSigned 171 171 +0.0% 1.00x
RangeIterationSigned64 200 200 +0.0% 1.00x
RangeIterationUnsigned 200 200 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 945 946 +0.1% 1.00x (?)
RecursiveOwnedParameter 2294 2295 +0.0% 1.00x
ReversedArray 57 57 +0.0% 1.00x
ReversedBidirectional 15408 15377 -0.2% 1.00x
ReversedDictionary 119 119 +0.0% 1.00x
RomanNumbers 111266 110946 -0.3% 1.00x (?)
SetExclusiveOr 3600 3570 -0.8% 1.01x
SetExclusiveOr_OfObjects 8442 8374 -0.8% 1.01x (?)
SetIntersect 321 323 +0.6% 0.99x
SetIntersect_OfObjects 1708 1707 -0.1% 1.00x
SetIsSubsetOf 292 292 +0.0% 1.00x
SetIsSubsetOf_OfObjects 349 349 +0.0% 1.00x
SetUnion 2989 2998 +0.3% 1.00x (?)
SetUnion_OfObjects 7051 6991 -0.9% 1.01x (?)
SevenBoom 1488 1476 -0.8% 1.01x (?)
SortLargeExistentials 6777 6785 +0.1% 1.00x (?)
SortLettersInPlace 1118 1101 -1.5% 1.02x
SortSortedStrings 1141 1090 -4.5% 1.05x
SortStrings 2001 1931 -3.5% 1.04x
SortStringsUnicode 15262 15276 +0.1% 1.00x (?)
StackPromo 21800 21796 -0.0% 1.00x (?)
StrComplexWalk 1568 1571 +0.2% 1.00x
StrToInt 2105 2116 +0.5% 0.99x
StringAdder 4133 4133 +0.0% 1.00x
StringBuilder 1399 1411 +0.9% 0.99x
StringBuilderLong 1063 1066 +0.3% 1.00x (?)
StringComparison_abnormal 851 849 -0.2% 1.00x (?)
StringComparison_ascii 960 975 +1.6% 0.98x
StringComparison_emoji 2465 2457 -0.3% 1.00x
StringComparison_fastPrenormal 8705 8727 +0.3% 1.00x (?)
StringComparison_latin1 5957 5949 -0.1% 1.00x (?)
StringComparison_longSharedPrefix 11231 11237 +0.1% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 4518 4509 -0.2% 1.00x (?)
StringComparison_slowerPrenormal 4135 4129 -0.1% 1.00x (?)
StringComparison_zalgo 1682 1697 +0.9% 0.99x
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 10 10 +0.0% 1.00x
StringHasPrefixAscii 1603 1603 +0.0% 1.00x
StringHasPrefixUnicode 28252 28166 -0.3% 1.00x
StringHasSuffixAscii 1717 1717 +0.0% 1.00x
StringHasSuffixUnicode 87929 87806 -0.1% 1.00x
StringInterpolation 9272 9229 -0.5% 1.00x (?)
StringMatch 7403 7312 -1.2% 1.01x
StringRemoveDupes 1021 980 -4.0% 1.04x
StringUTF16Builder 2389 2378 -0.5% 1.00x
StringWalk 1668 1592 -4.6% 1.05x
StringWithCString 46602 46608 +0.0% 1.00x (?)
SubstringComparable 2006 2003 -0.1% 1.00x (?)
SubstringEqualString 2099 2102 +0.1% 1.00x (?)
SubstringEquatable 3164 3180 +0.5% 0.99x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 69 70 +1.4% 0.99x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 21937 21864 -0.3% 1.00x (?)
SuffixAnySeqCRangeIter 3797 3823 +0.7% 0.99x
SuffixAnySeqCRangeIterLazy 3806 3818 +0.3% 1.00x
SuffixAnySeqCntRange 23 23 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 23 23 +0.0% 1.00x
SuffixAnySequence 5089 5115 +0.5% 0.99x
SuffixAnySequenceLazy 5196 5232 +0.7% 0.99x
SuffixSequence 3806 3831 +0.7% 0.99x
SuffixSequenceLazy 3826 3810 -0.4% 1.00x (?)
SumUsingReduce 102 101 -1.0% 1.01x
SumUsingReduceInto 102 102 +0.0% 1.00x
SuperChars 40757 40771 +0.0% 1.00x (?)
TwoSum 1017 1014 -0.3% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 318 318 +0.0% 1.00x
Walsh 449 449 +0.0% 1.00x
WordCountHistogramUTF16 52348 51830 -1.0% 1.01x (?)
WordCountUniqueUTF16 23214 22136 -4.6% 1.05x
WordSplitASCII 22998 22341 -2.9% 1.03x (?)
XorLoop 383 384 +0.3% 1.00x

Unoptimized (Onone)

Regression (12)
TEST OLD NEW DELTA SPEEDUP
ExclusivityIndependent 71 85 +19.7% 0.84x (?)
ObjectiveCBridgeStubFromArrayOfNSString 29391 35140 +19.6% 0.84x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 42315 50464 +19.3% 0.84x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 62531 70080 +12.1% 0.89x
CharIteration_russian_unicodeScalars_Backwards 244276 272628 +11.6% 0.90x (?)
CharIteration_ascii_unicodeScalars_Backwards 296243 323210 +9.1% 0.92x (?)
CharIteration_utf16_unicodeScalars_Backwards 255348 274693 +7.6% 0.93x (?)
CharIndexing_punctuated_unicodeScalars 79657 84696 +6.3% 0.94x (?)
DictionarySwapOfObjects 22305 23668 +6.1% 0.94x
ObjectiveCBridgeFromNSSetAnyObjectToString 88874 94272 +6.1% 0.94x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 72300 76447 +5.7% 0.95x (?)
CharIndexing_ascii_unicodeScalars 357026 377217 +5.7% 0.95x
Improvement (9)
TEST OLD NEW DELTA SPEEDUP
CharIteration_punctuated_unicodeScalars_Backwards 71589 64684 -9.6% 1.11x (?)
CharIteration_tweet_unicodeScalars_Backwards 639417 584691 -8.6% 1.09x (?)
ObjectiveCBridgeStubDataAppend 4593 4242 -7.6% 1.08x
Dictionary3 1334 1249 -6.4% 1.07x
DropFirstAnyCollectionLazy 109354 102929 -5.9% 1.06x (?)
PrefixAnyCollectionLazy 107833 101863 -5.5% 1.06x (?)
StringEdits 379405 358416 -5.5% 1.06x (?)
ObjectiveCBridgeStubToNSDate 15687 14844 -5.4% 1.06x (?)
Dictionary2 2961 2810 -5.1% 1.05x (?)
No Changes (337)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4924 4954 +0.6% 0.99x
AnyHashableWithAClass 90068 89877 -0.2% 1.00x
Array2D 634281 634339 +0.0% 1.00x (?)
ArrayAppend 5090 5087 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 789 788 -0.1% 1.00x (?)
ArrayAppendAscii 40254 40404 +0.4% 1.00x
ArrayAppendFromGeneric 793 792 -0.1% 1.00x (?)
ArrayAppendGenericStructs 1404 1406 +0.1% 1.00x (?)
ArrayAppendLatin1 63661 63288 -0.6% 1.01x
ArrayAppendLazyMap 168070 169949 +1.1% 0.99x
ArrayAppendOptionals 1403 1406 +0.2% 1.00x (?)
ArrayAppendRepeatCol 176020 174809 -0.7% 1.01x
ArrayAppendReserved 4722 4718 -0.1% 1.00x
ArrayAppendSequence 141645 144688 +2.1% 0.98x
ArrayAppendStrings 15350 15366 +0.1% 1.00x (?)
ArrayAppendToFromGeneric 790 790 +0.0% 1.00x
ArrayAppendToGeneric 793 791 -0.3% 1.00x (?)
ArrayAppendUTF16 63190 62973 -0.3% 1.00x
ArrayInClass 6617 6615 -0.0% 1.00x (?)
ArrayLiteral 1696 1694 -0.1% 1.00x (?)
ArrayOfGenericPOD2 1067 1066 -0.1% 1.00x (?)
ArrayOfGenericRef 9978 9979 +0.0% 1.00x (?)
ArrayOfPOD 749 750 +0.1% 1.00x
ArrayOfRef 9143 9152 +0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 789 788 -0.1% 1.00x (?)
ArrayPlusEqualFiveElementCollection 229988 231421 +0.6% 0.99x
ArrayPlusEqualSingleElementCollection 227042 227842 +0.4% 1.00x (?)
ArrayPlusEqualThreeElements 9334 9060 -2.9% 1.03x
ArraySubscript 83031 82770 -0.3% 1.00x
ArrayValueProp 3481 3544 +1.8% 0.98x (?)
ArrayValueProp2 17185 17707 +3.0% 0.97x
ArrayValueProp3 3946 3935 -0.3% 1.00x (?)
ArrayValueProp4 4146 4003 -3.4% 1.04x
BinaryFloatingPointConversionFromBinaryInteger 5911 5995 +1.4% 0.99x (?)
BitCount 2100 2100 +0.0% 1.00x
ByteSwap 3887 3907 +0.5% 0.99x
COWTree 12170 12310 +1.2% 0.99x (?)
CSVParsing 2863475 2867811 +0.2% 1.00x (?)
CSVParsingAlt 1314237 1313597 -0.0% 1.00x (?)
CSVParsingAltIndices 2620722 2609929 -0.4% 1.00x (?)
CStringLongAscii 5251 5239 -0.2% 1.00x (?)
CStringLongNonAscii 2253 2217 -1.6% 1.02x (?)
CStringShortAscii 7640 7574 -0.9% 1.01x
Calculator 1699 1679 -1.2% 1.01x
CaptureProp 343254 341867 -0.4% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 424741 422798 -0.5% 1.00x (?)
CharIndexing_chinese_unicodeScalars 269435 280372 +4.1% 0.96x (?)
CharIndexing_chinese_unicodeScalars_Backwards 332389 326403 -1.8% 1.02x (?)
CharIndexing_japanese_unicodeScalars 430130 448925 +4.4% 0.96x
CharIndexing_japanese_unicodeScalars_Backwards 530367 550666 +3.8% 0.96x
CharIndexing_korean_unicodeScalars 348536 344223 -1.2% 1.01x (?)
CharIndexing_korean_unicodeScalars_Backwards 404247 423642 +4.8% 0.95x
CharIndexing_punctuated_unicodeScalars_Backwards 91905 93546 +1.8% 0.98x (?)
CharIndexing_russian_unicodeScalars 296033 298644 +0.9% 0.99x (?)
CharIndexing_russian_unicodeScalars_Backwards 350545 353658 +0.9% 0.99x
CharIndexing_tweet_unicodeScalars 700126 705220 +0.7% 0.99x (?)
CharIndexing_tweet_unicodeScalars_Backwards 868260 849350 -2.2% 1.02x (?)
CharIndexing_utf16_unicodeScalars 302390 310240 +2.6% 0.97x
CharIndexing_utf16_unicodeScalars_Backwards 350533 356144 +1.6% 0.98x
CharIteration_ascii_unicodeScalars 155933 154843 -0.7% 1.01x (?)
CharIteration_chinese_unicodeScalars 117974 117503 -0.4% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 221684 221408 -0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars 186709 185979 -0.4% 1.00x
CharIteration_japanese_unicodeScalars_Backwards 355801 355255 -0.2% 1.00x (?)
CharIteration_korean_unicodeScalars 151137 150406 -0.5% 1.00x
CharIteration_korean_unicodeScalars_Backwards 316621 315967 -0.2% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 27924 27794 -0.5% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 51599 51629 +0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars 35015 34861 -0.4% 1.00x
CharIteration_russian_unicodeScalars 129832 129269 -0.4% 1.00x (?)
CharIteration_tweet_unicodeScalars 307573 306448 -0.4% 1.00x
CharIteration_utf16_unicodeScalars 132151 131243 -0.7% 1.01x
CharacterLiteralsLarge 5693 5699 +0.1% 1.00x
CharacterLiteralsSmall 708 707 -0.1% 1.00x
CharacterPropertiesFetch 5433 5484 +0.9% 0.99x (?)
CharacterPropertiesPrecomputed 4402 4368 -0.8% 1.01x (?)
CharacterPropertiesStashed 2340 2312 -1.2% 1.01x (?)
CharacterPropertiesStashedMemo 5092 5019 -1.4% 1.01x (?)
Chars 39724 39766 +0.1% 1.00x
ClassArrayGetter 982 982 +0.0% 1.00x
Combos 2134 2069 -3.0% 1.03x (?)
DictOfArraysToArrayOfDicts 3386 3360 -0.8% 1.01x (?)
Dictionary 2616 2566 -1.9% 1.02x (?)
Dictionary2OfObjects 5599 5606 +0.1% 1.00x (?)
Dictionary3OfObjects 2246 2174 -3.2% 1.03x
DictionaryBridge 2262 2274 +0.5% 0.99x (?)
DictionaryGroup 4389 4393 +0.1% 1.00x (?)
DictionaryGroupOfObjects 7421 7436 +0.2% 1.00x (?)
DictionaryLiteral 8401 8384 -0.2% 1.00x (?)
DictionaryOfObjects 6120 6231 +1.8% 0.98x (?)
DictionaryRemove 18526 18516 -0.1% 1.00x (?)
DictionaryRemoveOfObjects 50269 48742 -3.0% 1.03x
DictionarySubscriptDefaultMutation 1997 1992 -0.3% 1.00x
DictionarySubscriptDefaultMutationArray 2248 2245 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 8935 8859 -0.9% 1.01x (?)
DictionarySubscriptDefaultMutationOfObjects 5441 5576 +2.5% 0.98x
DictionarySwap 5431 5407 -0.4% 1.00x
DoubleWidthDivision 381302 371648 -2.5% 1.03x
DropFirstAnyCollection 14509 14456 -0.4% 1.00x
DropFirstAnySeqCRangeIter 21702 21723 +0.1% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 21594 21613 +0.1% 1.00x (?)
DropFirstAnySeqCntRange 14331 14369 +0.3% 1.00x
DropFirstAnySeqCntRangeLazy 14249 14314 +0.5% 1.00x
DropFirstAnySequence 10659 10647 -0.1% 1.00x
DropFirstAnySequenceLazy 10612 10673 +0.6% 0.99x
DropFirstArray 3783 3792 +0.2% 1.00x
DropFirstArrayLazy 25189 25323 +0.5% 0.99x
DropFirstCountableRange 326 326 +0.0% 1.00x
DropFirstCountableRangeLazy 26522 26506 -0.1% 1.00x (?)
DropFirstSequence 10267 10216 -0.5% 1.00x
DropFirstSequenceLazy 10285 10324 +0.4% 1.00x
DropLastAnyCollection 4835 4836 +0.0% 1.00x (?)
DropLastAnyCollectionLazy 34467 33360 -3.2% 1.03x (?)
DropLastAnySeqCRangeIter 38921 38891 -0.1% 1.00x (?)
DropLastAnySeqCRangeIterLazy 38616 39018 +1.0% 0.99x
DropLastAnySeqCntRange 4774 4770 -0.1% 1.00x
DropLastAnySeqCntRangeLazy 4761 4756 -0.1% 1.00x (?)
DropLastAnySequence 28858 28969 +0.4% 1.00x
DropLastAnySequenceLazy 28847 29154 +1.1% 0.99x
DropLastCountableRange 113 113 +0.0% 1.00x
DropLastCountableRangeLazy 8789 8765 -0.3% 1.00x (?)
DropLastSequence 28708 28869 +0.6% 0.99x
DropLastSequenceLazy 28797 29081 +1.0% 0.99x
DropWhileAnyCollection 18437 18416 -0.1% 1.00x
DropWhileAnyCollectionLazy 19795 19729 -0.3% 1.00x
DropWhileAnySeqCRangeIter 23310 23334 +0.1% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 20064 19964 -0.5% 1.01x
DropWhileAnySeqCntRange 18166 18303 +0.8% 0.99x
DropWhileAnySeqCntRangeLazy 19777 19763 -0.1% 1.00x (?)
DropWhileAnySequence 12087 12188 +0.8% 0.99x
DropWhileAnySequenceLazy 10088 10153 +0.6% 0.99x
DropWhileArrayLazy 13535 13563 +0.2% 1.00x
DropWhileCountableRange 4478 4469 -0.2% 1.00x (?)
DropWhileCountableRangeLazy 19237 19296 +0.3% 1.00x
DropWhileSequence 11726 11889 +1.4% 0.99x
DropWhileSequenceLazy 9676 9739 +0.7% 0.99x
EqualStringSubstring 467 468 +0.2% 1.00x
EqualSubstringString 466 466 +0.0% 1.00x
EqualSubstringSubstring 468 469 +0.2% 1.00x
EqualSubstringSubstringGenericEquatable 475 474 -0.2% 1.00x (?)
ErrorHandling 7025 7214 +2.7% 0.97x (?)
ExclusivityGlobal 194 194 +0.0% 1.00x
FilterEvenUsingReduce 3744 3764 +0.5% 0.99x (?)
FilterEvenUsingReduceInto 1990 2006 +0.8% 0.99x
FrequenciesUsingReduce 10363 10565 +1.9% 0.98x (?)
FrequenciesUsingReduceInto 5364 5245 -2.2% 1.02x (?)
Hanoi 20217 20271 +0.3% 1.00x (?)
HashTest 16356 16529 +1.1% 0.99x (?)
Histogram 6523 6457 -1.0% 1.01x (?)
Integrate 820 820 +0.0% 1.00x
IterateData 7910 7935 +0.3% 1.00x (?)
Join 1097 1098 +0.1% 1.00x (?)
LazilyFilteredArrayContains 769255 766378 -0.4% 1.00x (?)
LazilyFilteredArrays 1464517 1463784 -0.1% 1.00x (?)
LazilyFilteredRange 494222 494489 +0.1% 1.00x (?)
LessSubstringSubstring 469 469 +0.0% 1.00x
LessSubstringSubstringGenericComparable 475 473 -0.4% 1.00x
LinkedList 31256 31220 -0.1% 1.00x
LuhnAlgoEager 4851 4992 +2.9% 0.97x (?)
LuhnAlgoLazy 5081 5000 -1.6% 1.02x (?)
MapReduce 27940 28073 +0.5% 1.00x
MapReduceAnyCollection 27335 27489 +0.6% 0.99x (?)
MapReduceAnyCollectionShort 38551 39003 +1.2% 0.99x (?)
MapReduceClass 31857 31879 +0.1% 1.00x (?)
MapReduceClassShort 42826 43048 +0.5% 0.99x (?)
MapReduceLazyCollection 23380 23563 +0.8% 0.99x
MapReduceLazyCollectionShort 34936 34531 -1.2% 1.01x (?)
MapReduceLazySequence 18534 18487 -0.3% 1.00x
MapReduceSequence 30594 30390 -0.7% 1.01x
MapReduceShort 39710 39543 -0.4% 1.00x (?)
MapReduceShortString 254 254 +0.0% 1.00x
MapReduceString 1925 1944 +1.0% 0.99x (?)
Memset 44958 44965 +0.0% 1.00x (?)
MonteCarloE 897100 893319 -0.4% 1.00x
MonteCarloPi 3905987 3888609 -0.4% 1.00x
NSDictionaryCastToSwift 6631 6974 +5.2% 0.95x (?)
NSError 711 705 -0.8% 1.01x (?)
NSStringConversion 380 375 -1.3% 1.01x
NibbleSort 305127 305498 +0.1% 1.00x (?)
NopDeinit 173690 173543 -0.1% 1.00x (?)
ObjectAllocation 1318 1323 +0.4% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 25074 24689 -1.5% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 8664 9049 +4.4% 0.96x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 39459 40878 +3.6% 0.97x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 134250 132958 -1.0% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 69681 69059 -0.9% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 8180 7969 -2.6% 1.03x (?)
ObjectiveCBridgeFromNSString 3665 3544 -3.3% 1.03x (?)
ObjectiveCBridgeFromNSStringForced 2862 2837 -0.9% 1.01x (?)
ObjectiveCBridgeStubDateMutation 660 666 +0.9% 0.99x
ObjectiveCBridgeStubFromNSDate 4453 4339 -2.6% 1.03x (?)
ObjectiveCBridgeStubFromNSString 954 935 -2.0% 1.02x
ObjectiveCBridgeStubFromNSStringRef 208 207 -0.5% 1.00x (?)
ObjectiveCBridgeStubNSDataAppend 3126 3173 +1.5% 0.99x
ObjectiveCBridgeStubNSDateMutationRef 15369 15267 -0.7% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString 28988 29011 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3421 3383 -1.1% 1.01x (?)
ObjectiveCBridgeStubToNSString 1479 1464 -1.0% 1.01x
ObjectiveCBridgeStubToNSStringRef 161 161 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 347692 358421 +3.1% 0.97x (?)
ObjectiveCBridgeStubURLAppendPathRef 358869 353708 -1.4% 1.01x (?)
ObjectiveCBridgeToNSArray 29557 29065 -1.7% 1.02x (?)
ObjectiveCBridgeToNSDictionary 65901 65863 -0.1% 1.00x (?)
ObjectiveCBridgeToNSSet 54322 52142 -4.0% 1.04x (?)
ObjectiveCBridgeToNSString 1252 1253 +0.1% 1.00x (?)
ObserverClosure 6123 6134 +0.2% 1.00x (?)
ObserverForwarderStruct 4323 4313 -0.2% 1.00x
ObserverPartiallyAppliedMethod 7483 7514 +0.4% 1.00x (?)
ObserverUnappliedMethod 7787 7780 -0.1% 1.00x (?)
OpenClose 553 551 -0.4% 1.00x
PartialApplyDynamicType 39087 39185 +0.3% 1.00x (?)
Phonebook 20612 20516 -0.5% 1.00x
PointerArithmetics 114548 114518 -0.0% 1.00x (?)
PolymorphicCalls 6453 6374 -1.2% 1.01x (?)
PopFrontArray 6784 6796 +0.2% 1.00x (?)
PopFrontArrayGeneric 5718 5701 -0.3% 1.00x (?)
PopFrontUnsafePointer 10798 10791 -0.1% 1.00x (?)
PrefixAnyCollection 14460 14447 -0.1% 1.00x (?)
PrefixAnySeqCRangeIter 17526 17544 +0.1% 1.00x
PrefixAnySeqCRangeIterLazy 17472 17591 +0.7% 0.99x
PrefixAnySeqCntRange 14351 14378 +0.2% 1.00x (?)
PrefixAnySeqCntRangeLazy 14229 14336 +0.8% 0.99x
PrefixAnySequence 8882 8975 +1.0% 0.99x
PrefixAnySequenceLazy 8928 8909 -0.2% 1.00x (?)
PrefixArray 3774 3792 +0.5% 1.00x
PrefixArrayLazy 25111 25179 +0.3% 1.00x
PrefixCountableRange 326 326 +0.0% 1.00x
PrefixCountableRangeLazy 26451 26494 +0.2% 1.00x (?)
PrefixSequence 8580 8633 +0.6% 0.99x
PrefixSequenceLazy 8612 8599 -0.2% 1.00x (?)
PrefixWhileAnyCollection 26477 26342 -0.5% 1.01x
PrefixWhileAnyCollectionLazy 16461 16473 +0.1% 1.00x (?)
PrefixWhileAnySeqCRangeIter 33995 34020 +0.1% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 16450 16469 +0.1% 1.00x (?)
PrefixWhileAnySeqCntRange 26329 26258 -0.3% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 16602 16561 -0.2% 1.00x
PrefixWhileAnySequence 26455 26537 +0.3% 1.00x (?)
PrefixWhileAnySequenceLazy 9010 9040 +0.3% 1.00x (?)
PrefixWhileArray 11515 11538 +0.2% 1.00x (?)
PrefixWhileArrayLazy 11821 11847 +0.2% 1.00x
PrefixWhileCountableRange 12653 12682 +0.2% 1.00x
PrefixWhileCountableRangeLazy 16046 16082 +0.2% 1.00x (?)
PrefixWhileSequence 26282 26228 -0.2% 1.00x
PrefixWhileSequenceLazy 8747 8791 +0.5% 0.99x
Prims 9945 10054 +1.1% 0.99x (?)
PrimsSplit 10032 10126 +0.9% 0.99x (?)
RC4 16586 16553 -0.2% 1.00x
RGBHistogram 26545 26844 +1.1% 0.99x
RGBHistogramOfObjects 95748 94455 -1.4% 1.01x
RangeAssignment 2752 2710 -1.5% 1.02x
RangeIterationSigned 16894 16895 +0.0% 1.00x (?)
RangeIterationSigned64 40151 40352 +0.5% 1.00x
RangeIterationUnsigned 35804 36028 +0.6% 0.99x (?)
RangeReplaceableCollectionPlusDefault 8156 8346 +2.3% 0.98x (?)
RecursiveOwnedParameter 7743 7746 +0.0% 1.00x (?)
ReversedArray 13014 13077 +0.5% 1.00x
ReversedBidirectional 42213 42641 +1.0% 0.99x
ReversedDictionary 22877 23011 +0.6% 0.99x (?)
RomanNumbers 1237400 1228712 -0.7% 1.01x (?)
SetExclusiveOr 17198 17069 -0.8% 1.01x
SetExclusiveOr_OfObjects 41345 41387 +0.1% 1.00x (?)
SetIntersect 8314 8264 -0.6% 1.01x
SetIntersect_OfObjects 12222 12163 -0.5% 1.00x (?)
SetIsSubsetOf 1331 1325 -0.5% 1.00x
SetIsSubsetOf_OfObjects 1535 1529 -0.4% 1.00x (?)
SetUnion 11677 11678 +0.0% 1.00x (?)
SetUnion_OfObjects 28962 28920 -0.1% 1.00x (?)
SevenBoom 1584 1605 +1.3% 0.99x
Sim2DArray 43775 43785 +0.0% 1.00x (?)
SortLargeExistentials 15639 15642 +0.0% 1.00x (?)
SortLettersInPlace 2813 2818 +0.2% 1.00x (?)
SortSortedStrings 1320 1304 -1.2% 1.01x
SortStrings 2480 2467 -0.5% 1.01x
SortStringsUnicode 16148 16186 +0.2% 1.00x
StackPromo 93916 93032 -0.9% 1.01x (?)
StaticArray 2650 2641 -0.3% 1.00x (?)
StrComplexWalk 6657 6647 -0.2% 1.00x
StrToInt 57061 57052 -0.0% 1.00x (?)
StringAdder 4651 4751 +2.2% 0.98x (?)
StringBuilder 6806 6818 +0.2% 1.00x (?)
StringBuilderLong 2718 2721 +0.1% 1.00x (?)
StringComparison_abnormal 1434 1457 +1.6% 0.98x (?)
StringComparison_ascii 9499 9607 +1.1% 0.99x
StringComparison_emoji 3824 3828 +0.1% 1.00x (?)
StringComparison_fastPrenormal 13552 13579 +0.2% 1.00x (?)
StringComparison_latin1 9801 9767 -0.3% 1.00x (?)
StringComparison_longSharedPrefix 12883 12875 -0.1% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 6937 6972 +0.5% 0.99x (?)
StringComparison_slowerPrenormal 7099 6982 -1.6% 1.02x (?)
StringComparison_zalgo 2855 2855 +0.0% 1.00x
StringEnumRawValueInitialization 20974 20840 -0.6% 1.01x (?)
StringEqualPointerComparison 3217 3180 -1.2% 1.01x
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 198 204 +3.0% 0.97x (?)
StringHasPrefixAscii 3055 3049 -0.2% 1.00x (?)
StringHasPrefixUnicode 30721 30789 +0.2% 1.00x (?)
StringHasSuffixAscii 3133 3137 +0.1% 1.00x
StringHasSuffixUnicode 90615 90752 +0.2% 1.00x (?)
StringInterpolation 12957 13030 +0.6% 0.99x (?)
StringMatch 33333 33088 -0.7% 1.01x
StringRemoveDupes 1434 1388 -3.2% 1.03x
StringUTF16Builder 7574 7698 +1.6% 0.98x (?)
StringWalk 13553 13491 -0.5% 1.00x
StringWithCString 45339 45356 +0.0% 1.00x
StringWordBuilder 2453 2433 -0.8% 1.01x (?)
StringWordBuilderReservingCapacity 2159 2143 -0.7% 1.01x (?)
SubstringComparable 4118 4114 -0.1% 1.00x (?)
SubstringEqualString 3520 3658 +3.9% 0.96x (?)
SubstringEquatable 8062 7935 -1.6% 1.02x (?)
SubstringFromLongString 24 24 +0.0% 1.00x
SubstringFromLongStringGeneric 106 106 +0.0% 1.00x
SuffixAnyCollection 4832 4834 +0.0% 1.00x
SuffixAnyCollectionLazy 34354 33649 -2.1% 1.02x (?)
SuffixAnySeqCRangeIter 34944 34884 -0.2% 1.00x
SuffixAnySeqCRangeIterLazy 34694 34721 +0.1% 1.00x (?)
SuffixAnySeqCntRange 4777 4756 -0.4% 1.00x
SuffixAnySeqCntRangeLazy 4754 4768 +0.3% 1.00x
SuffixAnySequence 24999 25117 +0.5% 1.00x
SuffixAnySequenceLazy 24998 25149 +0.6% 0.99x
SuffixCountableRange 113 113 +0.0% 1.00x
SuffixCountableRangeLazy 8786 8855 +0.8% 0.99x
SuffixSequence 25215 25351 +0.5% 0.99x
SuffixSequenceLazy 24870 24986 +0.5% 1.00x
SumUsingReduce 169329 169954 +0.4% 1.00x
SumUsingReduceInto 167041 166542 -0.3% 1.00x (?)
SuperChars 217053 219385 +1.1% 0.99x
TwoSum 3951 3969 +0.5% 1.00x (?)
TypeFlood 164 158 -3.7% 1.04x (?)
UTF8Decode 30156 30140 -0.1% 1.00x (?)
Walsh 12111 12118 +0.1% 1.00x (?)
WordCountHistogramASCII 48278 48114 -0.3% 1.00x (?)
WordCountHistogramUTF16 101290 102316 +1.0% 0.99x (?)
WordCountUniqueASCII 8059 7836 -2.8% 1.03x
WordCountUniqueUTF16 30319 30426 +0.4% 1.00x (?)
WordSplitASCII 26186 26562 +1.4% 0.99x (?)
WordSplitUTF16 27343 27845 +1.8% 0.98x (?)
XorLoop 23634 23630 -0.0% 1.00x (?)
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@milseman milseman merged commit b8a8703 into swiftlang:master Jan 24, 2018
@milseman milseman deleted the hash_hack_attack branch January 24, 2018 16:16
@@ -177,7 +191,9 @@ extension String : Hashable {
/// your program. Do not save hash values to use during a future execution.
@_inlineable // FIXME(sil-serialize-all)
public var hashValue: Int {
return _guts._computeHashValue()
defer { _fixLifetime(self) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the _fixLifetime necessary here? If it is, we should audit for missing cases elsewhere; I started eliding it under the assumption that self lifetime is guaranteed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self lifetime is not guaranteed, and technically these are always necessary. _LegacyStringCore violated this rule all over the place, and never blew up, but doing this is a good idea. @atrick was working on a dependent-lifetime improvement wherein we could say that some values/expressions/properties have lifetime dependent on self, and that would alleviate this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's some confusion because self has a guaranteed calling convention, which is completely different from a fixed lifetime--it doesn't give you any lifetime guarantee. Currently, the best thing you can do is defer { _fixLifetime }. That's terrible for multiple reasons, but I haven't had any time to introduce a reasonable alternative.

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.

4 participants