Skip to content
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

[stdlib] Optimize ASCII String hashing #16029

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

lorentey
Copy link
Member

  • String hashing is not inlinable, so it can use _Hasher._core operations directly. Remove custom buffering.
  • Speed up ASCII hashing by as much as 5.5x by feeding the storage buffer directly into hasher in a single go.
  • For other strings, just feed the UTF-8 encoding of the normalized string to the hasher; don't switch to UTF-16 at the first non-ASCII scalar. (Doing that would make the hash encoding of some string sequences ambiguous, leading to artificial collisions.)
  • Add a single unconditional terminator byte, 0xFF. It's not a valid UTF-8 code unit, so it won't ever occur within a normalized string encoding.

- String hashing is not inlinable, so it can use _Hasher._core operations directly. Remove custom buffering.
- Speed up ASCII hashing by as much as 5.5x by feeding the storage buffer directly into hasher in a single go.
- For other strings, just feed the UTF-8 encoding of the normalized string to the hasher; don't switch to UTF-16 at the first non-ASCII scalar. (Doing that would make the hash encoding of some string sequences ambiguous, leading to artificial collisions.)
- Add a single unconditional terminator byte, 0xFF. It's not a valid UTF-8 code unit, so it won't ever occur within a normalized string encoding.
@lorentey lorentey requested review from lancep and milseman April 19, 2018 10:50
@lorentey
Copy link
Member Author

cc @lancep, @milseman

Lance was right, extending the Hasher API to take arbitrary byte buffers was the correct way to go!

@lorentey
Copy link
Member Author

@swift-ci test

@lorentey
Copy link
Member Author

@swift-ci benchmark

@lorentey
Copy link
Member Author

(This is change no. 2 in a series of PRs spawned from #15939)

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (20)
TEST OLD NEW DELTA SPEEDUP
PrefixWhileAnySeqCRangeIter 9086 11776 +29.6% 0.77x
PrefixWhileAnySequence 10071 12788 +27.0% 0.79x
FatCompactMap 213071 268762 +26.1% 0.79x
DropLastAnySeqCRangeIterLazy 3663 4570 +24.8% 0.80x
DropLastAnySeqCRangeIter 3680 4574 +24.3% 0.80x
SuffixAnySeqCRangeIter 3832 4758 +24.2% 0.81x
SuffixAnySeqCRangeIterLazy 3834 4755 +24.0% 0.81x
SuffixSequence 3676 4446 +20.9% 0.83x
SuffixSequenceLazy 3680 4448 +20.9% 0.83x
DropLastAnySequence 4992 5910 +18.4% 0.84x
SuffixAnySequence 5013 5926 +18.2% 0.85x
SuffixAnySequenceLazy 5104 5997 +17.5% 0.85x
DropLastAnySequenceLazy 5139 6030 +17.3% 0.85x
PrefixAnySeqCRangeIterLazy 16803 18958 +12.8% 0.89x
PrefixAnySeqCRangeIter 16788 18936 +12.8% 0.89x
DropWhileAnySeqCRangeIter 16849 18976 +12.6% 0.89x
DropFirstAnySeqCRangeIter 21446 23531 +9.7% 0.91x (?)
DropFirstAnySeqCRangeIterLazy 21429 23452 +9.4% 0.91x
StringWordBuilderReservingCapacity 1895 2035 +7.4% 0.93x
DataCopyBytes 2495 2634 +5.6% 0.95x
Improvement (10)
TEST OLD NEW DELTA SPEEDUP
WordSplitASCII 11869 7971 -32.8% 1.49x
WordSplitUTF16 13858 10100 -27.1% 1.37x
StringEnumRawValueInitialization 1134 829 -26.9% 1.37x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 80696 63629 -21.1% 1.27x
StaticArray 10 9 -10.0% 1.11x (?)
Dictionary3 335 303 -9.6% 1.11x
EqualSubstringSubstring 48 44 -8.3% 1.09x
Dictionary 819 757 -7.6% 1.08x
ObjectiveCBridgeStubFromArrayOfNSString 33295 31279 -6.1% 1.06x (?)
AngryPhonebook 3931 3736 -5.0% 1.05x (?)
No Changes (392)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 84961 84885 -0.1% 1.00x (?)
Array2D 2516 2544 +1.1% 0.99x (?)
ArrayAppend 1073 1072 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 789 787 -0.3% 1.00x (?)
ArrayAppendAscii 14053 14049 -0.0% 1.00x (?)
ArrayAppendFromGeneric 796 799 +0.4% 1.00x (?)
ArrayAppendGenericStructs 1428 1427 -0.1% 1.00x (?)
ArrayAppendLatin1 40380 39713 -1.7% 1.02x (?)
ArrayAppendLazyMap 1334 1341 +0.5% 0.99x (?)
ArrayAppendOptionals 1398 1426 +2.0% 0.98x (?)
ArrayAppendRepeatCol 1339 1339 +0.0% 1.00x
ArrayAppendReserved 804 803 -0.1% 1.00x (?)
ArrayAppendSequence 1113 1120 +0.6% 0.99x (?)
ArrayAppendStrings 6248 6239 -0.1% 1.00x (?)
ArrayAppendToFromGeneric 786 788 +0.3% 1.00x (?)
ArrayAppendToGeneric 792 788 -0.5% 1.01x (?)
ArrayAppendUTF16 39547 39754 +0.5% 0.99x (?)
ArrayInClass 85 85 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 150 150 +0.0% 1.00x
ArrayOfGenericRef 4379 4370 -0.2% 1.00x (?)
ArrayOfPOD 183 183 +0.0% 1.00x
ArrayOfRef 4369 4366 -0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 797 790 -0.9% 1.01x (?)
ArrayPlusEqualFiveElementCollection 5427 5470 +0.8% 0.99x (?)
ArrayPlusEqualSingleElementCollection 1069 1072 +0.3% 1.00x (?)
ArrayPlusEqualThreeElements 1645 1660 +0.9% 0.99x (?)
ArraySubscript 1521 1519 -0.1% 1.00x (?)
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
BinaryFloatingPointPropertiesBinade 25 25 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 28 28 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 35 35 +0.0% 1.00x
BitCount 202 202 +0.0% 1.00x
ByteSwap 101 101 +0.0% 1.00x
COWTree 5429 5403 -0.5% 1.00x (?)
CSVParsing 708901 709227 +0.0% 1.00x (?)
CSVParsingAlt 783383 783484 +0.0% 1.00x (?)
CSVParsingAltIndices 340957 341805 +0.2% 1.00x (?)
CStringLongAscii 4641 4640 -0.0% 1.00x (?)
CStringLongNonAscii 2244 2172 -3.2% 1.03x (?)
CStringShortAscii 3181 3199 +0.6% 0.99x (?)
Calculator 1165 1174 +0.8% 0.99x (?)
CaptureProp 4100 4102 +0.0% 1.00x (?)
ChainedFilterMap 1408 1408 +0.0% 1.00x
CharIndexing_ascii_unicodeScalars 15960 15958 -0.0% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 16005 16008 +0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars 12093 12089 -0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12127 12125 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 19100 19099 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 19165 19166 +0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars 15476 15477 +0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 15527 15526 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 2902 2903 +0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2903 2903 +0.0% 1.00x
CharIndexing_punctuated_unicodeScalars 3627 3656 +0.8% 0.99x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3634 3635 +0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars 13303 13297 -0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 13343 13342 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars 30954 30893 -0.2% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31512 31226 -0.9% 1.01x
CharIndexing_utf16_unicodeScalars 22626 22654 +0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 23315 23331 +0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars 20336 20404 +0.3% 1.00x
CharIteration_ascii_unicodeScalars_Backwards 15010 15009 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 15386 15500 +0.7% 0.99x (?)
CharIteration_chinese_unicodeScalars_Backwards 11372 11370 -0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars 24374 24504 +0.5% 0.99x (?)
CharIteration_japanese_unicodeScalars_Backwards 17971 17967 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 19743 19824 +0.4% 1.00x
CharIteration_korean_unicodeScalars_Backwards 14556 14553 -0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3645 3658 +0.4% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2727 2727 +0.0% 1.00x
CharIteration_punctuated_unicodeScalars 4581 4605 +0.5% 0.99x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3410 3410 +0.0% 1.00x
CharIteration_russian_unicodeScalars 16942 17041 +0.6% 0.99x
CharIteration_russian_unicodeScalars_Backwards 12505 12504 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 40190 40136 -0.1% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 29593 29600 +0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars 27714 27638 -0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 18148 18159 +0.1% 1.00x (?)
CharacterLiteralsLarge 5802 5794 -0.1% 1.00x (?)
CharacterLiteralsSmall 217 217 +0.0% 1.00x
CharacterPropertiesFetch 4533 4522 -0.2% 1.00x (?)
CharacterPropertiesPrecomputed 1277 1258 -1.5% 1.02x (?)
CharacterPropertiesStashed 1448 1471 +1.6% 0.98x (?)
CharacterPropertiesStashedMemo 1731 1723 -0.5% 1.00x (?)
Chars 1214 1215 +0.1% 1.00x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 486 487 +0.2% 1.00x (?)
DataAccessBytes 1223 1238 +1.2% 0.99x (?)
DataAppendArray 6232 6319 +1.4% 0.99x (?)
DataAppendBytes 5956 6141 +3.1% 0.97x (?)
DataAppendDataLargeToLarge 67550 68270 +1.1% 0.99x (?)
DataAppendDataLargeToMedium 35772 35950 +0.5% 1.00x (?)
DataAppendDataLargeToSmall 35176 35348 +0.5% 1.00x (?)
DataAppendDataMediumToLarge 38527 38474 -0.1% 1.00x (?)
DataAppendDataMediumToMedium 7309 7473 +2.2% 0.98x (?)
DataAppendDataMediumToSmall 6800 6854 +0.8% 0.99x (?)
DataAppendDataSmallToLarge 37804 37645 -0.4% 1.00x (?)
DataAppendDataSmallToMedium 7034 7049 +0.2% 1.00x (?)
DataAppendDataSmallToSmall 6765 6946 +2.7% 0.97x (?)
DataAppendSequence 19313 19293 -0.1% 1.00x (?)
DataCount 38 38 +0.0% 1.00x
DataMutateBytes 4318 4326 +0.2% 1.00x (?)
DataReplaceLarge 41300 41185 -0.3% 1.00x (?)
DataReplaceLargeBuffer 58557 58244 -0.5% 1.01x (?)
DataReplaceMedium 11307 11416 +1.0% 0.99x (?)
DataReplaceMediumBuffer 12320 12003 -2.6% 1.03x (?)
DataReplaceSmall 8832 8868 +0.4% 1.00x (?)
DataReplaceSmallBuffer 9446 9536 +1.0% 0.99x (?)
DataReset 3190 3171 -0.6% 1.01x (?)
DataSetCount 888 890 +0.2% 1.00x (?)
DataSubscript 237 237 +0.0% 1.00x
DictOfArraysToArrayOfDicts 833 823 -1.2% 1.01x (?)
Dictionary2 917 877 -4.4% 1.05x (?)
Dictionary2OfObjects 2433 2413 -0.8% 1.01x (?)
Dictionary3OfObjects 871 839 -3.7% 1.04x (?)
Dictionary4 854 852 -0.2% 1.00x (?)
Dictionary4OfObjects 974 983 +0.9% 0.99x (?)
DictionaryBridge 1216 1211 -0.4% 1.00x (?)
DictionaryCopy 126715 127296 +0.5% 1.00x (?)
DictionaryFilter 126502 126714 +0.2% 1.00x (?)
DictionaryGroup 278 278 +0.0% 1.00x
DictionaryGroupOfObjects 2323 2334 +0.5% 1.00x (?)
DictionaryLiteral 2122 2120 -0.1% 1.00x (?)
DictionaryOfObjects 2691 2645 -1.7% 1.02x (?)
DictionaryRemove 5482 5475 -0.1% 1.00x (?)
DictionaryRemoveOfObjects 29589 29795 +0.7% 0.99x (?)
DictionarySubscriptDefaultMutation 344 344 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 709 707 -0.3% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 4228 4222 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1976 1981 +0.3% 1.00x (?)
DictionarySwap 1462 1463 +0.1% 1.00x (?)
DictionarySwapAt 7467 7329 -1.8% 1.02x (?)
DictionarySwapAtOfObjects 53255 53090 -0.3% 1.00x (?)
DictionarySwapOfObjects 9695 9694 -0.0% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 83 84 +1.2% 0.99x
DropFirstAnyCollectionLazy 62555 62779 +0.4% 1.00x (?)
DropFirstAnySeqCntRange 41 41 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 41 41 +0.0% 1.00x
DropFirstAnySequence 4984 5001 +0.3% 1.00x (?)
DropFirstAnySequenceLazy 4985 4998 +0.3% 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 2681 2680 -0.0% 1.00x (?)
DropFirstSequenceLazy 2774 2774 +0.0% 1.00x
DropLastAnyCollection 31 31 +0.0% 1.00x
DropLastAnyCollectionLazy 20935 21045 +0.5% 0.99x (?)
DropLastAnySeqCntRange 13 13 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 13 13 +0.0% 1.00x
DropLastCountableRange 11 11 +0.0% 1.00x
DropLastCountableRangeLazy 11 11 +0.0% 1.00x
DropLastSequence 561 563 +0.4% 1.00x (?)
DropLastSequenceLazy 562 562 +0.0% 1.00x
DropWhileAnyCollection 107 107 +0.0% 1.00x
DropWhileAnyCollectionLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCntRange 50 50 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 125 125 +0.0% 1.00x
DropWhileAnySequence 4927 4919 -0.2% 1.00x (?)
DropWhileAnySequenceLazy 1856 1856 +0.0% 1.00x
DropWhileArrayLazy 88 88 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 105 105 +0.0% 1.00x
DropWhileSequence 2223 2223 +0.0% 1.00x
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 56 56 +0.0% 1.00x
EqualSubstringString 64 64 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 47 48 +2.1% 0.98x
ErrorHandling 1513 1504 -0.6% 1.01x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1294 1299 +0.4% 1.00x (?)
FilterEvenUsingReduceInto 147 147 +0.0% 1.00x
FloatingPointPrinting_Double_description_small 23427 23348 -0.3% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 23044 23044 +0.0% 1.00x
FloatingPointPrinting_Double_interpolated 76234 76102 -0.2% 1.00x (?)
FloatingPointPrinting_Float80_description_small 30220 30260 +0.1% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 30213 30324 +0.4% 1.00x (?)
FloatingPointPrinting_Float80_interpolated 80201 80333 +0.2% 1.00x (?)
FloatingPointPrinting_Float_description_small 5203 5203 +0.0% 1.00x
FloatingPointPrinting_Float_description_uniform 5135 5140 +0.1% 1.00x (?)
FloatingPointPrinting_Float_interpolated 52858 52723 -0.3% 1.00x (?)
FrequenciesUsingReduce 5273 5316 +0.8% 0.99x (?)
FrequenciesUsingReduceInto 1851 1858 +0.4% 1.00x (?)
Hanoi 2236 2226 -0.4% 1.00x (?)
HashTest 1026 1028 +0.2% 1.00x (?)
Histogram 883 888 +0.6% 0.99x
Integrate 354 354 +0.0% 1.00x
IterateData 1954 1964 +0.5% 0.99x (?)
Join 186 188 +1.1% 0.99x
LazilyFilteredArrayContains 38657 38655 -0.0% 1.00x (?)
LazilyFilteredArrays 64830 65078 +0.4% 1.00x (?)
LazilyFilteredRange 3874 3879 +0.1% 1.00x (?)
LessSubstringSubstring 49 49 +0.0% 1.00x
LessSubstringSubstringGenericComparable 49 49 +0.0% 1.00x
LinkedList 7603 7545 -0.8% 1.01x (?)
LuhnAlgoEager 302 304 +0.7% 0.99x (?)
LuhnAlgoLazy 300 303 +1.0% 0.99x (?)
MapReduce 370 369 -0.3% 1.00x (?)
MapReduceAnyCollection 429 429 +0.0% 1.00x
MapReduceAnyCollectionShort 2252 2253 +0.0% 1.00x (?)
MapReduceClass 3004 3001 -0.1% 1.00x (?)
MapReduceClassShort 4554 4555 +0.0% 1.00x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 444 446 +0.5% 1.00x (?)
MapReduceShort 2016 2029 +0.6% 0.99x (?)
MapReduceShortString 30 30 +0.0% 1.00x
MapReduceString 79 79 +0.0% 1.00x
Memset 216 214 -0.9% 1.01x (?)
MonteCarloE 10347 10347 +0.0% 1.00x
MonteCarloPi 42696 42690 -0.0% 1.00x (?)
NSDictionaryCastToSwift 5595 5534 -1.1% 1.01x (?)
NSError 174 174 +0.0% 1.00x
NSStringConversion 730 747 +2.3% 0.98x
NibbleSort 3669 3670 +0.0% 1.00x (?)
NopDeinit 31592 31585 -0.0% 1.00x (?)
ObjectAllocation 132 133 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObject 24522 25140 +2.5% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4770 4624 -3.1% 1.03x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 44293 43921 -0.8% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 42852 44530 +3.9% 0.96x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 110760 112699 +1.8% 0.98x (?)
ObjectiveCBridgeFromNSSetAnyObject 51592 51188 -0.8% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4731 4730 -0.0% 1.00x (?)
ObjectiveCBridgeFromNSString 1255 1241 -1.1% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2678 2685 +0.3% 1.00x (?)
ObjectiveCBridgeStubDataAppend 11300 11336 +0.3% 1.00x (?)
ObjectiveCBridgeStubDateMutation 400 400 +0.0% 1.00x
ObjectiveCBridgeStubFromNSDate 6281 6281 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 1062 1049 -1.2% 1.01x (?)
ObjectiveCBridgeStubFromNSStringRef 161 161 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2566 2571 +0.2% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 13161 13375 +1.6% 0.98x (?)
ObjectiveCBridgeStubToArrayOfNSString 38621 38271 -0.9% 1.01x (?)
ObjectiveCBridgeStubToNSDate 14497 14315 -1.3% 1.01x (?)
ObjectiveCBridgeStubToNSDateRef 3400 3420 +0.6% 0.99x (?)
ObjectiveCBridgeStubToNSString 2375 2374 -0.0% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 118 118 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 286350 283562 -1.0% 1.01x (?)
ObjectiveCBridgeStubURLAppendPathRef 278659 289851 +4.0% 0.96x (?)
ObjectiveCBridgeToNSArray 14278 14486 +1.5% 0.99x (?)
ObjectiveCBridgeToNSDictionary 25165 24669 -2.0% 1.02x (?)
ObjectiveCBridgeToNSSet 16275 16317 +0.3% 1.00x (?)
ObjectiveCBridgeToNSString 502 495 -1.4% 1.01x (?)
ObserverClosure 2157 2167 +0.5% 1.00x (?)
ObserverForwarderStruct 1247 1257 +0.8% 0.99x (?)
ObserverPartiallyAppliedMethod 3717 3734 +0.5% 1.00x (?)
ObserverUnappliedMethod 2614 2621 +0.3% 1.00x (?)
OpenClose 290 277 -4.5% 1.05x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 5206 5214 +0.2% 1.00x (?)
PointerArithmetics 31489 31497 +0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1801 1866 +3.6% 0.97x (?)
PopFrontArrayGeneric 1875 1817 -3.1% 1.03x (?)
PopFrontUnsafePointer 8985 8744 -2.7% 1.03x (?)
PrefixAnyCollection 84 84 +0.0% 1.00x
PrefixAnyCollectionLazy 62534 62961 +0.7% 0.99x (?)
PrefixAnySeqCntRange 27 28 +3.7% 0.96x
PrefixAnySeqCntRangeLazy 28 27 -3.6% 1.04x
PrefixAnySequence 4309 4316 +0.2% 1.00x (?)
PrefixAnySequenceLazy 4315 4323 +0.2% 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 2803 2803 +0.0% 1.00x
PrefixSequenceLazy 2275 2275 +0.0% 1.00x
PrefixWhileAnyCollection 154 154 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 90 90 +0.0% 1.00x
PrefixWhileAnySeqCRangeIterLazy 72 72 +0.0% 1.00x
PrefixWhileAnySeqCntRange 60 60 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 90 90 +0.0% 1.00x
PrefixWhileAnySequenceLazy 1393 1393 +0.0% 1.00x
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 36 36 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 359 360 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 1182 1187 +0.4% 1.00x (?)
PrimsSplit 1184 1184 +0.0% 1.00x
QueueConcrete 1133 1133 +0.0% 1.00x
QueueGeneric 1132 1132 +0.0% 1.00x
RC4 167 168 +0.6% 0.99x (?)
RGBHistogram 3995 4031 +0.9% 0.99x (?)
RGBHistogramOfObjects 25514 25610 +0.4% 1.00x (?)
RangeAssignment 349 350 +0.3% 1.00x (?)
RangeIterationSigned 171 171 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 985 985 +0.0% 1.00x
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 46 46 +0.0% 1.00x
RemoveWhereFilterString 350 352 +0.6% 0.99x (?)
RemoveWhereFilterStrings 431 431 +0.0% 1.00x
RemoveWhereMoveInts 14 14 +0.0% 1.00x
RemoveWhereMoveStrings 702 702 +0.0% 1.00x
RemoveWhereQuadraticInts 1289 1291 +0.2% 1.00x (?)
RemoveWhereQuadraticString 497 496 -0.2% 1.00x (?)
RemoveWhereQuadraticStrings 2755 2752 -0.1% 1.00x (?)
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 848 848 +0.0% 1.00x
ReversedArray 57 57 +0.0% 1.00x
ReversedBidirectional 16587 16588 +0.0% 1.00x (?)
ReversedDictionary 399 399 +0.0% 1.00x
RomanNumbers 141475 142117 +0.5% 1.00x (?)
SequenceAlgosAnySequence 11996 11951 -0.4% 1.00x (?)
SequenceAlgosArray 1567 1568 +0.1% 1.00x (?)
SequenceAlgosContiguousArray 1580 1580 +0.0% 1.00x
SequenceAlgosList 1350 1355 +0.4% 1.00x (?)
SequenceAlgosRange 2576 2576 +0.0% 1.00x
SequenceAlgosUnfoldSequence 1102 1102 +0.0% 1.00x
SetExclusiveOr 6855 6983 +1.9% 0.98x
SetExclusiveOr_OfObjects 14992 15042 +0.3% 1.00x (?)
SetIntersect 1042 1034 -0.8% 1.01x (?)
SetIntersect_OfObjects 2601 2553 -1.8% 1.02x (?)
SetIsSubsetOf 386 386 +0.0% 1.00x
SetIsSubsetOf_OfObjects 573 575 +0.3% 1.00x (?)
SetUnion 5765 5821 +1.0% 0.99x (?)
SetUnion_OfObjects 12740 12630 -0.9% 1.01x (?)
SevenBoom 884 875 -1.0% 1.01x (?)
Sim2DArray 417 416 -0.2% 1.00x (?)
SortLargeExistentials 6334 6311 -0.4% 1.00x
SortLettersInPlace 1056 1056 +0.0% 1.00x
SortSortedStrings 1062 1052 -0.9% 1.01x
SortStrings 2155 2145 -0.5% 1.00x (?)
SortStringsUnicode 2707 2662 -1.7% 1.02x (?)
StackPromo 22662 22664 +0.0% 1.00x (?)
StrComplexWalk 1784 1784 +0.0% 1.00x
StrToInt 2912 2937 +0.9% 0.99x
StringAdder 765 771 +0.8% 0.99x
StringBuilder 788 795 +0.9% 0.99x (?)
StringBuilderLong 1224 1216 -0.7% 1.01x (?)
StringBuilderWithLongSubstring 1414 1401 -0.9% 1.01x (?)
StringComparison_abnormal 816 794 -2.7% 1.03x (?)
StringComparison_ascii 1326 1329 +0.2% 1.00x (?)
StringComparison_emoji 795 821 +3.3% 0.97x (?)
StringComparison_fastPrenormal 818 823 +0.6% 0.99x
StringComparison_latin1 641 648 +1.1% 0.99x
StringComparison_longSharedPrefix 934 938 +0.4% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 1546 1624 +5.0% 0.95x (?)
StringComparison_slowerPrenormal 1702 1709 +0.4% 1.00x (?)
StringComparison_zalgo 125199 125424 +0.2% 1.00x (?)
StringEdits 171801 174085 +1.3% 0.99x (?)
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2118 2090 -1.3% 1.01x (?)
StringHasPrefixUnicode 111549 111396 -0.1% 1.00x (?)
StringHasSuffixAscii 2262 2233 -1.3% 1.01x
StringHasSuffixUnicode 116186 116312 +0.1% 1.00x (?)
StringInterpolation 10056 10060 +0.0% 1.00x (?)
StringInterpolationManySmallSegments 19037 18888 -0.8% 1.01x (?)
StringInterpolationSmall 6531 6611 +1.2% 0.99x (?)
StringMatch 11623 11666 +0.4% 1.00x (?)
StringRemoveDupes 837 806 -3.7% 1.04x (?)
StringUTF16Builder 2719 2759 +1.5% 0.99x (?)
StringUTF16SubstringBuilder 6226 6036 -3.1% 1.03x (?)
StringWalk 1441 1485 +3.1% 0.97x (?)
StringWithCString 40843 40833 -0.0% 1.00x (?)
StringWordBuilder 2392 2386 -0.3% 1.00x (?)
SubstringComparable 27 27 +0.0% 1.00x
SubstringEqualString 769 777 +1.0% 0.99x (?)
SubstringEquatable 1384 1404 +1.4% 0.99x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 75 74 -1.3% 1.01x (?)
SuffixAnyCollection 31 31 +0.0% 1.00x
SuffixAnyCollectionLazy 20950 20936 -0.1% 1.00x (?)
SuffixAnySeqCntRange 20 20 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 20 20 +0.0% 1.00x
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 11 11 +0.0% 1.00x
SumUsingReduce 101 101 +0.0% 1.00x
SumUsingReduceInto 97 97 +0.0% 1.00x
SuperChars 14554 14603 +0.3% 1.00x (?)
TwoSum 1741 1752 +0.6% 0.99x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 291 291 +0.0% 1.00x
Walsh 406 404 -0.5% 1.00x
WordCountHistogramASCII 8463 8724 +3.1% 0.97x (?)
WordCountHistogramUTF16 14950 15217 +1.8% 0.98x (?)
WordCountUniqueASCII 2616 2598 -0.7% 1.01x (?)
WordCountUniqueUTF16 7840 8123 +3.6% 0.97x (?)
XorLoop 394 395 +0.3% 1.00x (?)

Unoptimized (Onone)

Regression (132)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeStubFromNSStringRef 196 303 +54.6% 0.65x (?)
ReversedArray 12896 18553 +43.9% 0.70x
Chars 35934 50614 +40.9% 0.71x
StringComparison_ascii 9463 12684 +34.0% 0.75x
UTF8Decode 29811 39410 +32.2% 0.76x
StringComparison_fastPrenormal 4914 6469 +31.6% 0.76x
StringComparison_latin1 3832 5022 +31.1% 0.76x
SuperChars 85647 112121 +30.9% 0.76x
SequenceAlgosArray 754641 981958 +30.1% 0.77x
CharIteration_japanese_unicodeScalars_Backwards 303180 392149 +29.3% 0.77x
SumUsingReduceInto 152933 197103 +28.9% 0.78x
Join 800 1025 +28.1% 0.78x
SubstringComparable 1628 2082 +27.9% 0.78x
CharIteration_ascii_unicodeScalars 148596 189751 +27.7% 0.78x
CharIteration_japanese_unicodeScalars 178351 227493 +27.6% 0.78x
CharIteration_korean_unicodeScalars 144507 184106 +27.4% 0.78x
SumUsingReduce 158952 202111 +27.2% 0.79x
CharIteration_tweet_unicodeScalars 294309 374203 +27.1% 0.79x
ArrayAppendLazyMap 168833 214610 +27.1% 0.79x
CharIteration_russian_unicodeScalars 124046 157585 +27.0% 0.79x
CharIteration_punctuated_unicodeScalars 33553 42545 +26.8% 0.79x
PrefixArrayLazy 29354 37077 +26.3% 0.79x
CharIteration_chinese_unicodeScalars 113158 142783 +26.2% 0.79x
DropFirstArrayLazy 29393 37000 +25.9% 0.79x
MapReduceLazyCollection 22554 28355 +25.7% 0.80x
CharIteration_punctuatedJapanese_unicodeScalars 26679 33432 +25.3% 0.80x
DropWhileArrayLazy 14063 17566 +24.9% 0.80x
CharIteration_korean_unicodeScalars_Backwards 243835 304505 +24.9% 0.80x (?)
LazilyFilteredArrayContains 752081 938989 +24.9% 0.80x
CharIndexing_punctuated_unicodeScalars_Backwards 79272 98664 +24.5% 0.80x
CharIndexing_russian_unicodeScalars_Backwards 311296 387321 +24.4% 0.80x
CharIteration_punctuated_unicodeScalars_Backwards 55694 69195 +24.2% 0.80x (?)
StringComparison_slowerPrenormal 4124 5093 +23.5% 0.81x
SubstringEquatable 5410 6678 +23.4% 0.81x
DataAppendSequence 1889072 2319617 +22.8% 0.81x
CharIteration_tweet_unicodeScalars_Backwards 501414 615650 +22.8% 0.81x
CharIndexing_korean_unicodeScalars_Backwards 348066 426878 +22.6% 0.82x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 44257 54097 +22.2% 0.82x (?)
CharIteration_chinese_unicodeScalars_Backwards 191042 233396 +22.2% 0.82x (?)
WordCountUniqueASCII 7465 9111 +22.0% 0.82x
StringComparison_longSharedPrefix 2363 2884 +22.0% 0.82x
ReversedDictionary 24897 30375 +22.0% 0.82x
StringBuilder 5608 6833 +21.8% 0.82x
CharIteration_russian_unicodeScalars_Backwards 210022 255681 +21.7% 0.82x (?)
StringComparison_nonBMPSlowestPrenormal 3662 4454 +21.6% 0.82x (?)
ArrayAppendRepeatCol 182728 221906 +21.4% 0.82x
CharIndexing_ascii_unicodeScalars 332063 402605 +21.2% 0.82x
CharIndexing_tweet_unicodeScalars_Backwards 717390 869461 +21.2% 0.83x
RemoveWhereFilterStrings 2461 2979 +21.0% 0.83x
CharIndexing_japanese_unicodeScalars 397371 480914 +21.0% 0.83x (?)
StringComparison_emoji 1985 2400 +20.9% 0.83x
CharIteration_ascii_unicodeScalars_Backwards 254437 307360 +20.8% 0.83x
PrefixWhileArrayLazy 12321 14880 +20.8% 0.83x
ChainedFilterMap 233913 281999 +20.6% 0.83x
RemoveWhereFilterInts 1953 2354 +20.5% 0.83x
CharIndexing_chinese_unicodeScalars_Backwards 277892 334624 +20.4% 0.83x
CharIndexing_korean_unicodeScalars 322172 387842 +20.4% 0.83x
RemoveWhereFilterString 1307 1573 +20.4% 0.83x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 61516 73985 +20.3% 0.83x
CharIndexing_punctuated_unicodeScalars 74034 88979 +20.2% 0.83x
FatCompactMap 291142 349690 +20.1% 0.83x
FilterEvenUsingReduceInto 1954 2340 +19.8% 0.84x
CharIndexing_russian_unicodeScalars 276503 330577 +19.6% 0.84x
CharIndexing_chinese_unicodeScalars 250358 298573 +19.3% 0.84x
MapReduceLazyCollectionShort 33017 39331 +19.1% 0.84x
CharIndexing_japanese_unicodeScalars_Backwards 445905 529556 +18.8% 0.84x
CharIteration_utf16_unicodeScalars 126673 150232 +18.6% 0.84x
WordCountUniqueUTF16 12802 15172 +18.5% 0.84x
CharIndexing_tweet_unicodeScalars 665983 783379 +17.6% 0.85x
CharIteration_utf16_unicodeScalars_Backwards 217464 255724 +17.6% 0.85x (?)
ArrayValueProp2 15204 17863 +17.5% 0.85x
MapReduce 25544 29840 +16.8% 0.86x
MapReduceString 1738 2028 +16.7% 0.86x
MapReduceAnyCollection 25532 29777 +16.6% 0.86x
CharIndexing_punctuatedJapanese_unicodeScalars 58255 67806 +16.4% 0.86x
QueueConcrete 14241 16489 +15.8% 0.86x
DropFirstAnyCollectionLazy 97484 112029 +14.9% 0.87x
SuffixAnySeqCRangeIter 36130 41503 +14.9% 0.87x
ErrorHandling 6428 7374 +14.7% 0.87x
CharIndexing_ascii_unicodeScalars_Backwards 375961 431194 +14.7% 0.87x
MapReduceSequence 30336 34790 +14.7% 0.87x
CharIndexing_utf16_unicodeScalars 288564 330906 +14.7% 0.87x (?)
MapReduceClass 29452 33770 +14.7% 0.87x
SuffixAnySeqCRangeIterLazy 36253 41384 +14.2% 0.88x
LazilyFilteredArrays 1420989 1618450 +13.9% 0.88x
SubstringEqualString 1697 1931 +13.8% 0.88x (?)
MapReduceShort 36667 41652 +13.6% 0.88x
PrefixWhileAnySeqCRangeIter 34295 38861 +13.3% 0.88x
MapReduceAnyCollectionShort 36434 41059 +12.7% 0.89x
QueueGeneric 18677 21040 +12.7% 0.89x
Dictionary 2425 2725 +12.4% 0.89x (?)
StringUTF16Builder 8127 9121 +12.2% 0.89x (?)
RemoveWhereQuadraticString 2280 2550 +11.8% 0.89x (?)
DropWhileAnySeqCRangeIter 24360 27214 +11.7% 0.90x
DropLastAnySeqCRangeIterLazy 40460 45199 +11.7% 0.90x
DropLastAnySeqCRangeIter 40348 44980 +11.5% 0.90x
DropLastAnyCollectionLazy 33666 37505 +11.4% 0.90x
ArrayOfPOD 760 845 +11.2% 0.90x
PrefixAnySeqCRangeIterLazy 18736 20814 +11.1% 0.90x
FilterEvenUsingReduce 3759 4169 +10.9% 0.90x (?)
PrefixAnyCollectionLazy 101709 112272 +10.4% 0.91x
PrefixAnySeqCRangeIter 18708 20644 +10.3% 0.91x (?)
SuffixAnyCollectionLazy 33665 37128 +10.3% 0.91x
MapReduceClassShort 40365 44439 +10.1% 0.91x
CharIndexing_utf16_unicodeScalars_Backwards 331861 364986 +10.0% 0.91x
PrefixWhileSequence 26327 28899 +9.8% 0.91x
ObserverForwarderStruct 4341 4763 +9.7% 0.91x
StrToInt 80072 87780 +9.6% 0.91x (?)
DataSetCount 577 632 +9.5% 0.91x (?)
PrefixWhileAnySequence 26579 29046 +9.3% 0.92x
DropFirstAnySeqCRangeIterLazy 23326 25405 +8.9% 0.92x
RangeReplaceableCollectionPlusDefault 10790 11737 +8.8% 0.92x
DictionaryGroup 4524 4917 +8.7% 0.92x (?)
ObserverClosure 6408 6961 +8.6% 0.92x
Histogram 6557 7102 +8.3% 0.92x (?)
DropFirstAnySeqCRangeIter 23367 25278 +8.2% 0.92x
ObjectiveCBridgeFromNSSetAnyObjectForced 5652 6108 +8.1% 0.93x (?)
StringComparison_abnormal 1388 1493 +7.6% 0.93x (?)
RemoveWhereQuadraticInts 8034 8641 +7.6% 0.93x
ObserverPartiallyAppliedMethod 7985 8549 +7.1% 0.93x
StringWordBuilderReservingCapacity 2026 2169 +7.1% 0.93x
RemoveWhereQuadraticStrings 9684 10316 +6.5% 0.94x
StringUTF16SubstringBuilder 23372 24881 +6.5% 0.94x (?)
CStringShortAscii 6441 6844 +6.3% 0.94x (?)
ObjectAllocation 1309 1390 +6.2% 0.94x
FrequenciesUsingReduceInto 3675 3896 +6.0% 0.94x (?)
FloatingPointPrinting_Float80_description_uniform 58880 62389 +6.0% 0.94x
NSStringConversion 773 817 +5.7% 0.95x (?)
RGBHistogramOfObjects 77725 82096 +5.6% 0.95x (?)
Prims 9807 10356 +5.6% 0.95x
ObserverUnappliedMethod 8263 8725 +5.6% 0.95x
MapReduceShortString 236 249 +5.5% 0.95x
Improvement (13)
TEST OLD NEW DELTA SPEEDUP
WordSplitASCII 15607 11392 -27.0% 1.37x
SequenceAlgosContiguousArray 379555 283847 -25.2% 1.34x
WordSplitUTF16 18065 14011 -22.4% 1.29x
TypeFlood 238 191 -19.7% 1.25x (?)
CharacterPropertiesFetch 6630 5402 -18.5% 1.23x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 85743 74656 -12.9% 1.15x
ObjectiveCBridgeFromNSArrayAnyObjectToString 51164 46782 -8.6% 1.09x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 9799 8962 -8.5% 1.09x (?)
ObjectiveCBridgeToNSDictionary 27571 25280 -8.3% 1.09x (?)
StringMatch 44052 40502 -8.1% 1.09x
FloatingPointPrinting_Double_interpolated 101055 94419 -6.6% 1.07x (?)
OpenClose 907 857 -5.5% 1.06x (?)
Dictionary3 941 895 -4.9% 1.05x
No Changes (277)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 6137 6022 -1.9% 1.02x (?)
AnyHashableWithAClass 101923 102380 +0.4% 1.00x (?)
Array2D 661841 659835 -0.3% 1.00x
ArrayAppend 4666 4671 +0.1% 1.00x (?)
ArrayAppendArrayOfInt 863 866 +0.3% 1.00x (?)
ArrayAppendAscii 39778 39956 +0.4% 1.00x
ArrayAppendFromGeneric 871 869 -0.2% 1.00x (?)
ArrayAppendGenericStructs 1504 1505 +0.1% 1.00x (?)
ArrayAppendLatin1 64824 64722 -0.2% 1.00x (?)
ArrayAppendOptionals 1502 1502 +0.0% 1.00x
ArrayAppendReserved 4281 4281 +0.0% 1.00x
ArrayAppendSequence 104024 104067 +0.0% 1.00x (?)
ArrayAppendStrings 6384 6369 -0.2% 1.00x
ArrayAppendToFromGeneric 872 867 -0.6% 1.01x
ArrayAppendToGeneric 876 874 -0.2% 1.00x (?)
ArrayAppendUTF16 64977 64317 -1.0% 1.01x
ArrayInClass 6225 6219 -0.1% 1.00x (?)
ArrayLiteral 1803 1810 +0.4% 1.00x (?)
ArrayOfGenericPOD2 1187 1243 +4.7% 0.95x
ArrayOfGenericRef 10761 10728 -0.3% 1.00x (?)
ArrayOfRef 9926 9988 +0.6% 0.99x (?)
ArrayPlusEqualArrayOfInt 868 859 -1.0% 1.01x (?)
ArrayPlusEqualFiveElementCollection 235406 236604 +0.5% 0.99x (?)
ArrayPlusEqualSingleElementCollection 230580 232939 +1.0% 0.99x (?)
ArrayPlusEqualThreeElements 9273 9276 +0.0% 1.00x (?)
ArraySubscript 107756 108774 +0.9% 0.99x
ArrayValueProp 3678 3683 +0.1% 1.00x (?)
ArrayValueProp3 4148 4165 +0.4% 1.00x (?)
ArrayValueProp4 4125 4137 +0.3% 1.00x (?)
BinaryFloatingPointPropertiesBinade 88 91 +3.4% 0.97x
BinaryFloatingPointPropertiesNextUp 134 131 -2.2% 1.02x
BinaryFloatingPointPropertiesUlp 131 134 +2.3% 0.98x
BitCount 8883 8883 +0.0% 1.00x
ByteSwap 9607 9648 +0.4% 1.00x (?)
COWTree 11995 12088 +0.8% 0.99x (?)
CSVParsing 2844519 2854250 +0.3% 1.00x (?)
CSVParsingAlt 1405306 1416035 +0.8% 0.99x (?)
CSVParsingAltIndices 2352181 2345998 -0.3% 1.00x (?)
CStringLongAscii 5550 5533 -0.3% 1.00x
CStringLongNonAscii 2523 2445 -3.1% 1.03x (?)
Calculator 2198 2114 -3.8% 1.04x (?)
CaptureProp 276698 276952 +0.1% 1.00x (?)
CharacterLiteralsLarge 5775 5746 -0.5% 1.01x (?)
CharacterLiteralsSmall 707 730 +3.3% 0.97x (?)
CharacterPropertiesPrecomputed 3638 3656 +0.5% 1.00x (?)
CharacterPropertiesStashed 2318 2337 +0.8% 0.99x (?)
CharacterPropertiesStashedMemo 4429 4380 -1.1% 1.01x (?)
ClassArrayGetter 986 986 +0.0% 1.00x
Combos 2269 2244 -1.1% 1.01x (?)
DataAccessBytes 2350 2382 +1.4% 0.99x (?)
DataAppendArray 5559 5470 -1.6% 1.02x (?)
DataAppendBytes 5232 5353 +2.3% 0.98x (?)
DataAppendDataLargeToLarge 66931 67020 +0.1% 1.00x (?)
DataAppendDataLargeToMedium 35209 35324 +0.3% 1.00x (?)
DataAppendDataLargeToSmall 34253 34392 +0.4% 1.00x (?)
DataAppendDataMediumToLarge 37108 37672 +1.5% 0.99x (?)
DataAppendDataMediumToMedium 6550 6790 +3.7% 0.96x (?)
DataAppendDataMediumToSmall 5913 6105 +3.2% 0.97x (?)
DataAppendDataSmallToLarge 36728 36734 +0.0% 1.00x (?)
DataAppendDataSmallToMedium 6084 6031 -0.9% 1.01x (?)
DataAppendDataSmallToSmall 6016 6134 +2.0% 0.98x (?)
DataCopyBytes 2501 2500 -0.0% 1.00x (?)
DataCount 223 223 +0.0% 1.00x
DataMutateBytes 5460 5215 -4.5% 1.05x (?)
DataReplaceLarge 40200 39679 -1.3% 1.01x (?)
DataReplaceLargeBuffer 57817 58240 +0.7% 0.99x (?)
DataReplaceMedium 9332 9184 -1.6% 1.02x (?)
DataReplaceMediumBuffer 12131 12274 +1.2% 0.99x (?)
DataReplaceSmall 7082 7005 -1.1% 1.01x (?)
DataReplaceSmallBuffer 10041 9661 -3.8% 1.04x (?)
DataReset 2880 2871 -0.3% 1.00x (?)
DataSubscript 444 443 -0.2% 1.00x
DictOfArraysToArrayOfDicts 3459 3589 +3.8% 0.96x (?)
Dictionary2 1524 1494 -2.0% 1.02x (?)
Dictionary2OfObjects 4516 4647 +2.9% 0.97x
Dictionary3OfObjects 2297 2194 -4.5% 1.05x (?)
Dictionary4 1607 1616 +0.6% 0.99x
Dictionary4OfObjects 2221 2238 +0.8% 0.99x (?)
DictionaryBridge 1350 1328 -1.6% 1.02x (?)
DictionaryCopy 326354 325278 -0.3% 1.00x (?)
DictionaryFilter 345335 340059 -1.5% 1.02x (?)
DictionaryGroupOfObjects 7862 8030 +2.1% 0.98x (?)
DictionaryLiteral 8917 8930 +0.1% 1.00x (?)
DictionaryOfObjects 6082 6387 +5.0% 0.95x (?)
DictionaryRemove 18336 18377 +0.2% 1.00x (?)
DictionaryRemoveOfObjects 54691 55084 +0.7% 0.99x (?)
DictionarySubscriptDefaultMutation 2036 2028 -0.4% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2307 2311 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9673 9900 +2.3% 0.98x (?)
DictionarySubscriptDefaultMutationOfObjects 5668 5489 -3.2% 1.03x (?)
DictionarySwap 5276 5283 +0.1% 1.00x (?)
DictionarySwapAt 35519 36516 +2.8% 0.97x (?)
DictionarySwapAtOfObjects 114655 115748 +1.0% 0.99x (?)
DictionarySwapOfObjects 20474 19750 -3.5% 1.04x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 15400 15502 +0.7% 0.99x (?)
DropFirstAnySeqCntRange 15466 15498 +0.2% 1.00x (?)
DropFirstAnySeqCntRangeLazy 15303 15305 +0.0% 1.00x (?)
DropFirstAnySequence 12793 13111 +2.5% 0.98x
DropFirstAnySequenceLazy 12961 12967 +0.0% 1.00x (?)
DropFirstArray 3478 3450 -0.8% 1.01x (?)
DropFirstCountableRange 323 323 +0.0% 1.00x
DropFirstCountableRangeLazy 33747 33653 -0.3% 1.00x (?)
DropFirstSequence 12366 12687 +2.6% 0.97x (?)
DropFirstSequenceLazy 12817 12711 -0.8% 1.01x
DropLastAnyCollection 5144 5190 +0.9% 0.99x
DropLastAnySeqCntRange 5163 5191 +0.5% 0.99x (?)
DropLastAnySeqCntRangeLazy 5102 5162 +1.2% 0.99x
DropLastAnySequence 30698 31444 +2.4% 0.98x
DropLastAnySequenceLazy 30414 31265 +2.8% 0.97x
DropLastCountableRange 112 111 -0.9% 1.01x
DropLastCountableRangeLazy 11302 11243 -0.5% 1.01x (?)
DropLastSequence 30570 31345 +2.5% 0.98x
DropLastSequenceLazy 30316 31269 +3.1% 0.97x
DropWhileAnyCollection 19783 19790 +0.0% 1.00x (?)
DropWhileAnyCollectionLazy 22257 22347 +0.4% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 22104 22354 +1.1% 0.99x
DropWhileAnySeqCntRange 19729 19826 +0.5% 1.00x
DropWhileAnySeqCntRangeLazy 22111 22348 +1.1% 0.99x
DropWhileAnySequence 13737 13770 +0.2% 1.00x (?)
DropWhileAnySequenceLazy 12510 12665 +1.2% 0.99x (?)
DropWhileCountableRange 4812 4806 -0.1% 1.00x (?)
DropWhileCountableRangeLazy 21827 21913 +0.4% 1.00x (?)
DropWhileSequence 13249 13610 +2.7% 0.97x
DropWhileSequenceLazy 12053 12076 +0.2% 1.00x
EqualStringSubstring 71 71 +0.0% 1.00x
EqualSubstringString 71 71 +0.0% 1.00x
EqualSubstringSubstring 72 72 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 57 57 +0.0% 1.00x
ExclusivityGlobal 197 197 +0.0% 1.00x
ExclusivityIndependent 72 72 +0.0% 1.00x
FloatingPointPrinting_Double_description_small 24686 24527 -0.6% 1.01x
FloatingPointPrinting_Double_description_uniform 36251 36331 +0.2% 1.00x (?)
FloatingPointPrinting_Float80_description_small 31408 31536 +0.4% 1.00x (?)
FloatingPointPrinting_Float80_interpolated 118331 118707 +0.3% 1.00x (?)
FloatingPointPrinting_Float_description_small 7034 6983 -0.7% 1.01x
FloatingPointPrinting_Float_description_uniform 17460 17630 +1.0% 0.99x (?)
FloatingPointPrinting_Float_interpolated 71085 69346 -2.4% 1.03x (?)
FrequenciesUsingReduce 11368 11839 +4.1% 0.96x (?)
Hanoi 20495 20350 -0.7% 1.01x
HashTest 20996 21543 +2.6% 0.97x (?)
Integrate 460 460 +0.0% 1.00x
IterateData 5484 5476 -0.1% 1.00x (?)
LazilyFilteredRange 534415 536711 +0.4% 1.00x
LessSubstringSubstring 72 72 +0.0% 1.00x
LessSubstringSubstringGenericComparable 57 57 +0.0% 1.00x
LinkedList 32476 32447 -0.1% 1.00x (?)
LuhnAlgoEager 5583 5481 -1.8% 1.02x (?)
LuhnAlgoLazy 5675 5637 -0.7% 1.01x (?)
MapReduceLazySequence 20120 20463 +1.7% 0.98x (?)
Memset 44146 44112 -0.1% 1.00x (?)
MonteCarloE 1149557 1162166 +1.1% 0.99x
MonteCarloPi 5198445 5239543 +0.8% 0.99x
NSDictionaryCastToSwift 6684 6706 +0.3% 1.00x (?)
NSError 608 610 +0.3% 1.00x (?)
NibbleSort 500882 507195 +1.3% 0.99x
NopDeinit 199301 199286 -0.0% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 28018 29107 +3.9% 0.96x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 46019 45715 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 118481 122615 +3.5% 0.97x (?)
ObjectiveCBridgeFromNSSetAnyObject 56800 54339 -4.3% 1.05x (?)
ObjectiveCBridgeFromNSString 2864 2849 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2808 2792 -0.6% 1.01x (?)
ObjectiveCBridgeStubDataAppend 6305 6271 -0.5% 1.01x (?)
ObjectiveCBridgeStubDateMutation 773 773 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 35162 34606 -1.6% 1.02x (?)
ObjectiveCBridgeStubFromNSDate 6978 6970 -0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSString 1088 1087 -0.1% 1.00x (?)
ObjectiveCBridgeStubNSDataAppend 3056 3037 -0.6% 1.01x (?)
ObjectiveCBridgeStubNSDateMutationRef 15837 15114 -4.6% 1.05x (?)
ObjectiveCBridgeStubToArrayOfNSString 38854 38817 -0.1% 1.00x (?)
ObjectiveCBridgeStubToNSDate 16465 15879 -3.6% 1.04x (?)
ObjectiveCBridgeStubToNSDateRef 3460 3498 +1.1% 0.99x (?)
ObjectiveCBridgeStubToNSString 2410 2409 -0.0% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 159 159 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 297707 299016 +0.4% 1.00x (?)
ObjectiveCBridgeStubURLAppendPathRef 311660 310897 -0.2% 1.00x (?)
ObjectiveCBridgeToNSArray 14234 14633 +2.8% 0.97x (?)
ObjectiveCBridgeToNSSet 16904 17038 +0.8% 0.99x (?)
ObjectiveCBridgeToNSString 549 553 +0.7% 0.99x (?)
PartialApplyDynamicType 40806 39497 -3.2% 1.03x (?)
Phonebook 19259 19345 +0.4% 1.00x
PointerArithmetics 126042 120397 -4.5% 1.05x
PolymorphicCalls 2470 2474 +0.2% 1.00x (?)
PopFrontArray 4661 4640 -0.5% 1.00x (?)
PopFrontArrayGeneric 5422 5445 +0.4% 1.00x (?)
PopFrontUnsafePointer 10763 10672 -0.8% 1.01x (?)
PrefixAnyCollection 15402 15466 +0.4% 1.00x (?)
PrefixAnySeqCntRange 15517 15537 +0.1% 1.00x (?)
PrefixAnySeqCntRangeLazy 15275 15323 +0.3% 1.00x (?)
PrefixAnySequence 10456 10652 +1.9% 0.98x
PrefixAnySequenceLazy 10593 10774 +1.7% 0.98x (?)
PrefixArray 3471 3446 -0.7% 1.01x
PrefixCountableRange 323 323 +0.0% 1.00x
PrefixCountableRangeLazy 33769 33663 -0.3% 1.00x (?)
PrefixSequence 10135 10177 +0.4% 1.00x (?)
PrefixSequenceLazy 10217 10449 +2.3% 0.98x (?)
PrefixWhileAnyCollection 28818 28705 -0.4% 1.00x (?)
PrefixWhileAnyCollectionLazy 18372 18407 +0.2% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 18257 18188 -0.4% 1.00x
PrefixWhileAnySeqCntRange 28730 28715 -0.1% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 18299 18278 -0.1% 1.00x (?)
PrefixWhileAnySequenceLazy 11126 11138 +0.1% 1.00x (?)
PrefixWhileArray 10467 10429 -0.4% 1.00x
PrefixWhileCountableRange 13645 13542 -0.8% 1.01x
PrefixWhileCountableRangeLazy 17995 18006 +0.1% 1.00x (?)
PrefixWhileSequenceLazy 10862 10880 +0.2% 1.00x (?)
PrimsSplit 9899 10368 +4.7% 0.95x
RC4 16548 16360 -1.1% 1.01x (?)
RGBHistogram 25328 26498 +4.6% 0.96x (?)
RangeAssignment 2626 2670 +1.7% 0.98x (?)
RangeIterationSigned 14878 14986 +0.7% 0.99x (?)
RecursiveOwnedParameter 6213 6128 -1.4% 1.01x
RemoveWhereMoveInts 3386 3399 +0.4% 1.00x
RemoveWhereMoveStrings 3891 3905 +0.4% 1.00x
RemoveWhereSwapInts 6100 6365 +4.3% 0.96x
RemoveWhereSwapStrings 6803 7084 +4.1% 0.96x
ReversedBidirectional 44105 43979 -0.3% 1.00x (?)
RomanNumbers 1412668 1424821 +0.9% 0.99x (?)
SequenceAlgosAnySequence 12875 12878 +0.0% 1.00x (?)
SequenceAlgosList 8637 8689 +0.6% 0.99x
SequenceAlgosRange 1261645 1269752 +0.6% 0.99x (?)
SequenceAlgosUnfoldSequence 6414 6520 +1.7% 0.98x
SetExclusiveOr 17160 17335 +1.0% 0.99x (?)
SetExclusiveOr_OfObjects 46985 46357 -1.3% 1.01x (?)
SetIntersect 6966 6989 +0.3% 1.00x
SetIntersect_OfObjects 11176 11160 -0.1% 1.00x (?)
SetIsSubsetOf 1222 1231 +0.7% 0.99x (?)
SetIsSubsetOf_OfObjects 1754 1748 -0.3% 1.00x (?)
SetUnion 12536 12545 +0.1% 1.00x (?)
SetUnion_OfObjects 32420 32639 +0.7% 0.99x (?)
SevenBoom 1090 1090 +0.0% 1.00x
Sim2DArray 43427 43423 -0.0% 1.00x (?)
SortLargeExistentials 11647 11539 -0.9% 1.01x (?)
SortLettersInPlace 1939 1965 +1.3% 0.99x (?)
SortSortedStrings 1153 1144 -0.8% 1.01x
SortStrings 2341 2338 -0.1% 1.00x (?)
SortStringsUnicode 2975 2854 -4.1% 1.04x (?)
StackPromo 103231 102025 -1.2% 1.01x (?)
StaticArray 2564 2549 -0.6% 1.01x (?)
StrComplexWalk 6615 6618 +0.0% 1.00x (?)
StringAdder 1133 1121 -1.1% 1.01x (?)
StringBuilderLong 2911 2934 +0.8% 0.99x
StringBuilderWithLongSubstring 4805 4782 -0.5% 1.00x (?)
StringComparison_zalgo 127981 127930 -0.0% 1.00x (?)
StringEdits 386864 398748 +3.1% 0.97x (?)
StringEnumRawValueInitialization 33718 33305 -1.2% 1.01x
StringEqualPointerComparison 1591 1593 +0.1% 1.00x
StringFromLongWholeSubstring 12 12 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 197 198 +0.5% 0.99x (?)
StringHasPrefixAscii 3094 3149 +1.8% 0.98x
StringHasPrefixUnicode 109366 107866 -1.4% 1.01x
StringHasSuffixAscii 3211 3297 +2.7% 0.97x
StringHasSuffixUnicode 107386 107182 -0.2% 1.00x (?)
StringInterpolation 11436 11289 -1.3% 1.01x (?)
StringInterpolationManySmallSegments 20836 20677 -0.8% 1.01x (?)
StringInterpolationSmall 8843 8632 -2.4% 1.02x (?)
StringRemoveDupes 822 801 -2.6% 1.03x
StringWalk 13313 13323 +0.1% 1.00x (?)
StringWithCString 45571 45731 +0.4% 1.00x (?)
StringWordBuilder 2495 2578 +3.3% 0.97x
SubstringFromLongString 18 18 +0.0% 1.00x
SubstringFromLongStringGeneric 108 108 +0.0% 1.00x
SuffixAnyCollection 5164 5181 +0.3% 1.00x (?)
SuffixAnySeqCntRange 5165 5191 +0.5% 0.99x (?)
SuffixAnySeqCntRangeLazy 5113 5105 -0.2% 1.00x (?)
SuffixAnySequence 26256 27107 +3.2% 0.97x
SuffixAnySequenceLazy 26151 27051 +3.4% 0.97x
SuffixCountableRange 111 111 +0.0% 1.00x
SuffixCountableRangeLazy 11301 11238 -0.6% 1.01x (?)
SuffixSequence 26235 27150 +3.5% 0.97x
SuffixSequenceLazy 26044 26968 +3.5% 0.97x
TwoSum 3803 3813 +0.3% 1.00x (?)
Walsh 11941 11934 -0.1% 1.00x (?)
WordCountHistogramASCII 38427 39380 +2.5% 0.98x (?)
WordCountHistogramUTF16 46558 47275 +1.5% 0.98x (?)
XorLoop 23226 23247 +0.1% 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

Copy link
Contributor

@lancep lancep left a comment

Choose a reason for hiding this comment

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

Awesome!

@lorentey lorentey merged commit a155b75 into swiftlang:master Apr 19, 2018
@lorentey lorentey deleted the fast-ascii-hashing branch April 19, 2018 17:26
@lorentey
Copy link
Member Author

Our non-smoke benchmarks are still quite noisy; none of these regressions seem to touch String hashing 😞

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