Skip to content

[stdlib] Speed up bridged Dictionary instances #17742

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 7 commits into from
Jul 5, 2018

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Jul 4, 2018

Dictionary’s native storage classes and _SwiftDeferredNSDictionary override -[NSDictionary getObjects:andKeys:] instead of its safer replacement, -[NSDictionary getObjects:andKeys:count:].

Overriding the correct method will considerably speed up some Cocoa operations on bridged dictionaries.

rdar://problem/39285882

Dictionary’s native storage classes and _SwiftDeferredNSDictionary override -[NSDictionary getObjects:andKeys:] instead of its safer replacement, -[NSDictionary getObjects:andKeys:count:].

Overriding the correct method will considerably speed up some Cocoa operations on bridged dictionaries.

rdar://problem/39285882
@lorentey
Copy link
Member Author

lorentey commented Jul 4, 2018

@swift-ci please test

@lorentey
Copy link
Member Author

lorentey commented Jul 4, 2018

I don't think we have benchmarks for bridged dictionaries yet, but just in case:

@swift-ci please benchmark

// The user is expected to provide a storage of the correct size
if let unmanagedKeys = _UnmanagedAnyObjectArray(keys) {
if let unmanagedObjects = _UnmanagedAnyObjectArray(objects) {
// keys nonnull, objects nonnull
for (offset: i, element: (key: key, value: val)) in full.enumerated() {
unmanagedObjects[i] = _bridgeAnythingToObjectiveC(val)
unmanagedKeys[i] = _bridgeAnythingToObjectiveC(key)
guard i < count else { break }
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the drive-by comment, but shouldn’t this be checked before assigning at position i? (Same applies below)

Copy link
Member Author

Choose a reason for hiding this comment

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

Gah, of course! Serves me right for not adding proper tests. Thanks!

@swift-ci
Copy link
Contributor

swift-ci commented Jul 4, 2018

Build comment file:

Optimized (O)

Regression (1)
TEST OLD NEW DELTA SPEEDUP
ClassArrayGetter 12 13 +8.3% 0.92x
Improvement (8)
TEST OLD NEW DELTA SPEEDUP
DataAppendDataMediumToLarge 33716 30206 -10.4% 1.12x (?)
StringBuilder 424 392 -7.5% 1.08x
StringAdder 509 472 -7.3% 1.08x
StringBuilderSmallReservingCapacity 436 407 -6.7% 1.07x
RemoveWhereSwapInts 18 17 -5.6% 1.06x
ArrayAppendReserved 748 709 -5.2% 1.06x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 40529 38530 -4.9% 1.05x (?)
StringInterpolationSmall 3910 3722 -4.8% 1.05x
No Changes (446)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3345 3393 +1.4% 0.99x (?)
AnyHashableWithAClass 81759 81517 -0.3% 1.00x (?)
Array2D 2545 2545 +0.0% 1.00x
ArrayAppend 976 937 -4.0% 1.04x
ArrayAppendArrayOfInt 674 674 +0.0% 1.00x
ArrayAppendAscii 3429 3395 -1.0% 1.01x (?)
ArrayAppendAsciiSubstring 22426 22343 -0.4% 1.00x (?)
ArrayAppendFromGeneric 675 675 +0.0% 1.00x
ArrayAppendGenericStructs 1211 1213 +0.2% 1.00x (?)
ArrayAppendLatin1 37560 36950 -1.6% 1.02x
ArrayAppendLatin1Substring 127246 128081 +0.7% 0.99x
ArrayAppendLazyMap 1178 1178 +0.0% 1.00x
ArrayAppendOptionals 1213 1212 -0.1% 1.00x (?)
ArrayAppendRepeatCol 1174 1178 +0.3% 1.00x (?)
ArrayAppendSequence 980 982 +0.2% 1.00x (?)
ArrayAppendStrings 5658 5561 -1.7% 1.02x
ArrayAppendToFromGeneric 675 675 +0.0% 1.00x
ArrayAppendToGeneric 676 676 +0.0% 1.00x
ArrayAppendUTF16 38057 36262 -4.7% 1.05x
ArrayAppendUTF16Substring 126385 124751 -1.3% 1.01x
ArrayInClass 77 77 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 130 129 -0.8% 1.01x (?)
ArrayOfGenericRef 3942 3954 +0.3% 1.00x (?)
ArrayOfPOD 156 156 +0.0% 1.00x
ArrayOfRef 3917 3926 +0.2% 1.00x (?)
ArrayPlusEqualArrayOfInt 676 675 -0.1% 1.00x (?)
ArrayPlusEqualFiveElementCollection 4903 4810 -1.9% 1.02x
ArrayPlusEqualSingleElementCollection 976 942 -3.5% 1.04x
ArrayPlusEqualThreeElements 1486 1486 +0.0% 1.00x
ArraySubscript 1376 1372 -0.3% 1.00x (?)
ArrayValueProp 7 7 +0.0% 1.00x
ArrayValueProp2 7 7 +0.0% 1.00x
ArrayValueProp3 7 7 +0.0% 1.00x
ArrayValueProp4 7 7 +0.0% 1.00x
BinaryFloatingPointPropertiesBinade 23 23 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 25 25 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 31 31 +0.0% 1.00x
BitCount 181 181 +0.0% 1.00x
ByteSwap 93 92 -1.1% 1.01x (?)
COWArrayGuaranteedParameterOverhead 7773 7814 +0.5% 0.99x (?)
COWTree 3302 3302 +0.0% 1.00x
CSVParsing 617912 592987 -4.0% 1.04x (?)
CSVParsingAlt 725803 726746 +0.1% 1.00x (?)
CSVParsingAltIndices 306270 306299 +0.0% 1.00x (?)
CStringLongAscii 3618 3693 +2.1% 0.98x
CStringLongNonAscii 2086 2154 +3.3% 0.97x
CStringShortAscii 2985 2986 +0.0% 1.00x (?)
Calculator 173 172 -0.6% 1.01x (?)
CaptureProp 3670 3684 +0.4% 1.00x (?)
ChainedFilterMap 1263 1263 +0.0% 1.00x
CharIndexing_ascii_unicodeScalars 15447 15413 -0.2% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 14622 14590 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars 11674 11697 +0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 11057 11061 +0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 18513 18469 -0.2% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 17415 17477 +0.4% 1.00x (?)
CharIndexing_korean_unicodeScalars 14972 14935 -0.2% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 14150 14152 +0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 2783 2781 -0.1% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2630 2634 +0.2% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 3485 3480 -0.1% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3292 3288 -0.1% 1.00x (?)
CharIndexing_russian_unicodeScalars 12883 12885 +0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 12171 12172 +0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars 29792 29796 +0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 28637 28758 +0.4% 1.00x (?)
CharIndexing_utf16_unicodeScalars 20679 20678 -0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 21189 21138 -0.2% 1.00x (?)
CharIteration_ascii_unicodeScalars 19290 19453 +0.8% 0.99x (?)
CharIteration_ascii_unicodeScalars_Backwards 13776 13784 +0.1% 1.00x (?)
CharIteration_chinese_unicodeScalars 14635 14734 +0.7% 0.99x (?)
CharIteration_chinese_unicodeScalars_Backwards 10428 10438 +0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars 23140 23267 +0.5% 0.99x (?)
CharIteration_japanese_unicodeScalars_Backwards 16487 16510 +0.1% 1.00x (?)
CharIteration_korean_unicodeScalars 18727 18891 +0.9% 0.99x (?)
CharIteration_korean_unicodeScalars_Backwards 13364 13365 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3473 3457 -0.5% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2502 2495 -0.3% 1.00x (?)
CharIteration_punctuated_unicodeScalars 4356 4358 +0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3125 3122 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 16089 16175 +0.5% 0.99x (?)
CharIteration_russian_unicodeScalars_Backwards 11479 11479 +0.0% 1.00x
CharIteration_tweet_unicodeScalars 38079 38448 +1.0% 0.99x (?)
CharIteration_tweet_unicodeScalars_Backwards 27252 27271 +0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars 25174 25143 -0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 16927 16748 -1.1% 1.01x (?)
CharacterLiteralsLarge 5237 5237 +0.0% 1.00x
CharacterLiteralsSmall 195 195 +0.0% 1.00x
CharacterPropertiesFetch 4133 4139 +0.1% 1.00x (?)
CharacterPropertiesPrecomputed 895 897 +0.2% 1.00x (?)
CharacterPropertiesStashed 1350 1348 -0.1% 1.00x (?)
CharacterPropertiesStashedMemo 1392 1391 -0.1% 1.00x (?)
Chars 914 913 -0.1% 1.00x (?)
Combos 440 439 -0.2% 1.00x (?)
DataAccessBytes 1024 1026 +0.2% 1.00x (?)
DataAppendArray 4656 4638 -0.4% 1.00x (?)
DataAppendBytes 4405 4403 -0.0% 1.00x (?)
DataAppendDataLargeToLarge 60192 60858 +1.1% 0.99x (?)
DataAppendDataLargeToMedium 31706 31616 -0.3% 1.00x (?)
DataAppendDataLargeToSmall 31074 30965 -0.4% 1.00x (?)
DataAppendDataMediumToMedium 5982 6053 +1.2% 0.99x (?)
DataAppendDataMediumToSmall 5459 5443 -0.3% 1.00x (?)
DataAppendDataSmallToLarge 33204 33115 -0.3% 1.00x (?)
DataAppendDataSmallToMedium 5474 5532 +1.1% 0.99x (?)
DataAppendDataSmallToSmall 5475 5286 -3.5% 1.04x (?)
DataAppendSequence 18383 18356 -0.1% 1.00x (?)
DataCopyBytes 437 438 +0.2% 1.00x (?)
DataCount 33 33 +0.0% 1.00x
DataMutateBytes 3559 3471 -2.5% 1.03x (?)
DataReplaceLarge 32855 33264 +1.2% 0.99x (?)
DataReplaceLargeBuffer 50663 50751 +0.2% 1.00x (?)
DataReplaceMedium 6681 6973 +4.4% 0.96x (?)
DataReplaceMediumBuffer 9747 9580 -1.7% 1.02x (?)
DataReplaceSmall 5031 4905 -2.5% 1.03x (?)
DataReplaceSmallBuffer 7469 7830 +4.8% 0.95x (?)
DataReset 2518 2519 +0.0% 1.00x (?)
DataSetCount 487 488 +0.2% 1.00x (?)
DataSubscript 197 197 +0.0% 1.00x
DictOfArraysToArrayOfDicts 699 698 -0.1% 1.00x (?)
Dictionary 452 458 +1.3% 0.99x (?)
Dictionary2 575 559 -2.8% 1.03x
Dictionary2OfObjects 1865 1866 +0.1% 1.00x (?)
Dictionary3 200 197 -1.5% 1.02x (?)
Dictionary3OfObjects 662 661 -0.2% 1.00x (?)
Dictionary4 286 291 +1.7% 0.98x
Dictionary4Legacy 663 666 +0.5% 1.00x (?)
Dictionary4OfObjects 410 417 +1.7% 0.98x
Dictionary4OfObjectsLegacy 813 813 +0.0% 1.00x
DictionaryBridge 1042 1057 +1.4% 0.99x (?)
DictionaryCopy 92685 93511 +0.9% 0.99x (?)
DictionaryFilter 92674 92438 -0.3% 1.00x (?)
DictionaryGroup 194 195 +0.5% 0.99x (?)
DictionaryGroupOfObjects 1906 1914 +0.4% 1.00x (?)
DictionaryKeysContainsCocoa 37 36 -2.7% 1.03x (?)
DictionaryKeysContainsNative 28 28 +0.0% 1.00x
DictionaryLiteral 1698 1702 +0.2% 1.00x (?)
DictionaryOfObjects 2123 2119 -0.2% 1.00x (?)
DictionaryRemove 3782 3798 +0.4% 1.00x (?)
DictionaryRemoveOfObjects 23036 23180 +0.6% 0.99x (?)
DictionarySubscriptDefaultMutation 237 237 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 539 540 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 3586 3598 +0.3% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1544 1543 -0.1% 1.00x (?)
DictionarySwap 942 929 -1.4% 1.01x
DictionarySwapAt 6213 6226 +0.2% 1.00x (?)
DictionarySwapAtOfObjects 46774 46706 -0.1% 1.00x (?)
DictionarySwapOfObjects 7916 7921 +0.1% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 68 68 +0.0% 1.00x
DropFirstAnyCollectionLazy 58350 58586 +0.4% 1.00x (?)
DropFirstAnySeqCRangeIter 83 83 +0.0% 1.00x
DropFirstAnySeqCRangeIterLazy 83 83 +0.0% 1.00x
DropFirstAnySeqCntRange 64 64 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 64 64 +0.0% 1.00x
DropFirstAnySequence 1652 1652 +0.0% 1.00x
DropFirstAnySequenceLazy 1653 1652 -0.1% 1.00x (?)
DropFirstArray 31 31 +0.0% 1.00x
DropFirstArrayLazy 31 31 +0.0% 1.00x
DropFirstCountableRange 31 31 +0.0% 1.00x
DropFirstCountableRangeLazy 31 31 +0.0% 1.00x
DropFirstSequence 2404 2404 +0.0% 1.00x
DropFirstSequenceLazy 2482 2487 +0.2% 1.00x
DropLastAnyCollection 25 25 +0.0% 1.00x
DropLastAnyCollectionLazy 19475 19580 +0.5% 0.99x (?)
DropLastAnySeqCRangeIter 2945 2948 +0.1% 1.00x (?)
DropLastAnySeqCRangeIterLazy 2941 2956 +0.5% 0.99x (?)
DropLastAnySeqCntRange 10 10 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 10 10 +0.0% 1.00x
DropLastAnySequence 4420 4432 +0.3% 1.00x (?)
DropLastAnySequenceLazy 4509 4524 +0.3% 1.00x (?)
DropLastCountableRange 10 10 +0.0% 1.00x
DropLastCountableRangeLazy 10 10 +0.0% 1.00x
DropLastSequence 564 569 +0.9% 0.99x (?)
DropLastSequenceLazy 564 570 +1.1% 0.99x (?)
DropWhileAnyCollection 89 89 +0.0% 1.00x
DropWhileAnyCollectionLazy 116 116 +0.0% 1.00x
DropWhileAnySeqCRangeIter 68 68 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 116 116 +0.0% 1.00x
DropWhileAnySeqCntRange 85 85 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 116 116 +0.0% 1.00x
DropWhileAnySequence 1669 1669 +0.0% 1.00x
DropWhileAnySequenceLazy 1663 1663 +0.0% 1.00x
DropWhileArrayLazy 79 79 +0.0% 1.00x
DropWhileCountableRange 32 32 +0.0% 1.00x
DropWhileCountableRangeLazy 94 94 +0.0% 1.00x
DropWhileSequence 1974 1990 +0.8% 0.99x
DropWhileSequenceLazy 79 79 +0.0% 1.00x
EqualStringSubstring 45 45 +0.0% 1.00x
EqualSubstringString 45 45 +0.0% 1.00x
EqualSubstringSubstring 45 45 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 45 45 +0.0% 1.00x
ErrorHandling 1080 1059 -1.9% 1.02x
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FatCompactMap 179572 179841 +0.1% 1.00x (?)
FilterEvenUsingReduce 1172 1164 -0.7% 1.01x (?)
FilterEvenUsingReduceInto 132 133 +0.8% 0.99x (?)
FloatingPointPrinting_Double_description_small 19371 19414 +0.2% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 18733 18737 +0.0% 1.00x (?)
FloatingPointPrinting_Double_interpolated 55461 55450 -0.0% 1.00x (?)
FloatingPointPrinting_Float80_description_small 25488 25564 +0.3% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 24425 24597 +0.7% 0.99x (?)
FloatingPointPrinting_Float80_interpolated 59101 58710 -0.7% 1.01x (?)
FloatingPointPrinting_Float_description_small 4854 4850 -0.1% 1.00x (?)
FloatingPointPrinting_Float_description_uniform 4758 4756 -0.0% 1.00x (?)
FloatingPointPrinting_Float_interpolated 35093 34636 -1.3% 1.01x (?)
FrequenciesUsingReduce 4394 4401 +0.2% 1.00x (?)
FrequenciesUsingReduceInto 1352 1344 -0.6% 1.01x (?)
Hanoi 1987 1964 -1.2% 1.01x (?)
HashTest 849 843 -0.7% 1.01x (?)
Histogram 578 581 +0.5% 0.99x
Integrate 299 300 +0.3% 1.00x (?)
IterateData 1325 1348 +1.7% 0.98x
Join 148 142 -4.1% 1.04x (?)
LazilyFilteredArrayContains 31813 32889 +3.4% 0.97x
LazilyFilteredArrays 58868 59057 +0.3% 1.00x (?)
LazilyFilteredRange 3440 3455 +0.4% 1.00x (?)
LessSubstringSubstring 46 45 -2.2% 1.02x
LessSubstringSubstringGenericComparable 46 45 -2.2% 1.02x
LinkedList 6806 6777 -0.4% 1.00x (?)
LuhnAlgoEager 397 404 +1.8% 0.98x (?)
LuhnAlgoLazy 400 401 +0.2% 1.00x (?)
MapReduce 332 332 +0.0% 1.00x
MapReduceAnyCollection 332 332 +0.0% 1.00x
MapReduceAnyCollectionShort 1818 1852 +1.9% 0.98x (?)
MapReduceClass 2684 2688 +0.1% 1.00x (?)
MapReduceClassShort 4094 4096 +0.0% 1.00x (?)
MapReduceLazyCollection 12 12 +0.0% 1.00x
MapReduceLazyCollectionShort 32 33 +3.1% 0.97x (?)
MapReduceLazySequence 77 77 +0.0% 1.00x
MapReduceSequence 413 408 -1.2% 1.01x (?)
MapReduceShort 1794 1780 -0.8% 1.01x (?)
MapReduceShortString 18 18 +0.0% 1.00x
MapReduceString 42 43 +2.4% 0.98x (?)
Memset 192 193 +0.5% 0.99x (?)
MonteCarloE 9294 9293 -0.0% 1.00x (?)
MonteCarloPi 38510 38516 +0.0% 1.00x (?)
NSDictionaryCastToSwift 6002 5983 -0.3% 1.00x (?)
NSError 148 147 -0.7% 1.01x (?)
NSStringConversion 620 618 -0.3% 1.00x
NibbleSort 3315 3314 -0.0% 1.00x (?)
NopDeinit 27047 27051 +0.0% 1.00x (?)
ObjectAllocation 118 118 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 22251 22270 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4125 4077 -1.2% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 41362 40808 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 97505 98198 +0.7% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObject 43025 43084 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4450 4509 +1.3% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 63234 63604 +0.6% 0.99x (?)
ObjectiveCBridgeFromNSString 1120 1100 -1.8% 1.02x (?)
ObjectiveCBridgeFromNSStringForced 2454 2418 -1.5% 1.01x (?)
ObjectiveCBridgeStubDataAppend 5638 5593 -0.8% 1.01x (?)
ObjectiveCBridgeStubDateMutation 359 359 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 28664 29578 +3.2% 0.97x (?)
ObjectiveCBridgeStubFromNSDate 5607 5608 +0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSString 917 895 -2.4% 1.02x (?)
ObjectiveCBridgeStubFromNSStringRef 139 139 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2342 2314 -1.2% 1.01x (?)
ObjectiveCBridgeStubNSDateMutationRef 11598 11635 +0.3% 1.00x (?)
ObjectiveCBridgeStubToArrayOfNSString 35845 35871 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSDate 13706 13329 -2.8% 1.03x (?)
ObjectiveCBridgeStubToNSDateRef 3083 3064 -0.6% 1.01x (?)
ObjectiveCBridgeStubToNSString 2097 2102 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 103 103 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 244752 242182 -1.1% 1.01x (?)
ObjectiveCBridgeStubURLAppendPathRef 242959 243481 +0.2% 1.00x (?)
ObjectiveCBridgeToNSArray 13366 13138 -1.7% 1.02x (?)
ObjectiveCBridgeToNSDictionary 23991 23522 -2.0% 1.02x (?)
ObjectiveCBridgeToNSSet 15465 15236 -1.5% 1.02x (?)
ObjectiveCBridgeToNSString 401 414 +3.2% 0.97x
ObserverClosure 1915 1917 +0.1% 1.00x (?)
ObserverForwarderStruct 1044 1040 -0.4% 1.00x (?)
ObserverPartiallyAppliedMethod 3341 3326 -0.4% 1.00x (?)
ObserverUnappliedMethod 2168 2163 -0.2% 1.00x (?)
OpaqueConsumingUsers 3749 3748 -0.0% 1.00x (?)
OpenClose 61 59 -3.3% 1.03x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 6112 5950 -2.7% 1.03x
PointerArithmetics 30813 30817 +0.0% 1.00x (?)
PolymorphicCalls 22 22 +0.0% 1.00x
PopFrontArray 1758 1704 -3.1% 1.03x (?)
PopFrontArrayGeneric 1773 1772 -0.1% 1.00x (?)
PopFrontUnsafePointer 8514 8513 -0.0% 1.00x (?)
PrefixAnyCollection 68 68 +0.0% 1.00x
PrefixAnyCollectionLazy 58453 58543 +0.2% 1.00x (?)
PrefixAnySeqCRangeIter 35 35 +0.0% 1.00x
PrefixAnySeqCRangeIterLazy 35 35 +0.0% 1.00x
PrefixAnySeqCntRange 64 64 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 64 64 +0.0% 1.00x
PrefixAnySequence 1236 1236 +0.0% 1.00x
PrefixAnySequenceLazy 1236 1236 +0.0% 1.00x
PrefixArray 31 31 +0.0% 1.00x
PrefixArrayLazy 31 31 +0.0% 1.00x
PrefixCountableRange 31 31 +0.0% 1.00x
PrefixCountableRangeLazy 31 31 +0.0% 1.00x
PrefixSequence 1985 1993 +0.4% 1.00x (?)
PrefixSequenceLazy 2041 2041 +0.0% 1.00x
PrefixWhileAnyCollection 131 131 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 64 64 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 340 340 +0.0% 1.00x
PrefixWhileAnySeqCRangeIterLazy 80 79 -1.2% 1.01x
PrefixWhileAnySeqCntRange 127 127 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 64 64 +0.0% 1.00x
PrefixWhileAnySequence 1377 1375 -0.1% 1.00x (?)
PrefixWhileAnySequenceLazy 1248 1248 +0.0% 1.00x
PrefixWhileArray 79 79 +0.0% 1.00x
PrefixWhileArrayLazy 63 63 +0.0% 1.00x
PrefixWhileCountableRange 33 33 +0.0% 1.00x
PrefixWhileCountableRangeLazy 31 31 +0.0% 1.00x
PrefixWhileSequence 320 320 +0.0% 1.00x
PrefixWhileSequenceLazy 47 47 +0.0% 1.00x
Prims 803 806 +0.4% 1.00x (?)
PrimsSplit 804 805 +0.1% 1.00x (?)
QueueConcrete 1026 1025 -0.1% 1.00x (?)
QueueGeneric 1023 1022 -0.1% 1.00x (?)
RC4 134 134 +0.0% 1.00x
RGBHistogram 2738 2712 -0.9% 1.01x (?)
RGBHistogramOfObjects 21149 21168 +0.1% 1.00x (?)
Radix2CooleyTukey 11059 11058 -0.0% 1.00x (?)
Radix2CooleyTukeyf 7918 7813 -1.3% 1.01x (?)
RandomDoubleDef 24003 24038 +0.1% 1.00x (?)
RandomDoubleLCG 2025 2054 +1.4% 0.99x
RandomIntegersDef 21861 21853 -0.0% 1.00x (?)
RandomIntegersLCG 155 155 +0.0% 1.00x
RandomShuffleDef 729602 729813 +0.0% 1.00x (?)
RandomShuffleLCG 52171 52344 +0.3% 1.00x (?)
RangeAssignment 302 302 +0.0% 1.00x
RangeIterationSigned 179 179 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 910 911 +0.1% 1.00x (?)
RecursiveOwnedParameter 103 103 +0.0% 1.00x
RemoveWhereFilterInts 41 41 +0.0% 1.00x
RemoveWhereFilterString 220 218 -0.9% 1.01x
RemoveWhereFilterStrings 389 389 +0.0% 1.00x
RemoveWhereMoveInts 13 13 +0.0% 1.00x
RemoveWhereMoveStrings 634 635 +0.2% 1.00x (?)
RemoveWhereQuadraticInts 1159 1161 +0.2% 1.00x (?)
RemoveWhereQuadraticString 336 339 +0.9% 0.99x (?)
RemoveWhereQuadraticStrings 2477 2473 -0.2% 1.00x (?)
RemoveWhereSwapStrings 769 769 +0.0% 1.00x
ReversedArray 51 51 +0.0% 1.00x
ReversedBidirectional 14991 15053 +0.4% 1.00x (?)
ReversedDictionary 201 200 -0.5% 1.00x (?)
RomanNumbers 75209 72882 -3.1% 1.03x
SequenceAlgosAnySequence 10683 10733 +0.5% 1.00x (?)
SequenceAlgosArray 1386 1386 +0.0% 1.00x
SequenceAlgosContiguousArray 1386 1386 +0.0% 1.00x
SequenceAlgosList 1209 1209 +0.0% 1.00x
SequenceAlgosRange 2311 2311 +0.0% 1.00x
SequenceAlgosUnfoldSequence 989 989 +0.0% 1.00x
SetExclusiveOr 4509 4620 +2.5% 0.98x (?)
SetExclusiveOr_OfObjects 10350 10466 +1.1% 0.99x
SetIntersect 611 609 -0.3% 1.00x (?)
SetIntersect_OfObjects 1469 1466 -0.2% 1.00x (?)
SetIsSubsetOf 305 305 +0.0% 1.00x
SetIsSubsetOf_OfObjects 389 388 -0.3% 1.00x (?)
SetUnion 3952 3937 -0.4% 1.00x (?)
SetUnion_OfObjects 8944 9030 +1.0% 0.99x (?)
SevenBoom 754 756 +0.3% 1.00x (?)
Sim2DArray 373 373 +0.0% 1.00x
SortLargeExistentials 4915 4926 +0.2% 1.00x (?)
SortLettersInPlace 890 895 +0.6% 0.99x (?)
SortSortedStrings 758 749 -1.2% 1.01x
SortStrings 1602 1568 -2.1% 1.02x
SortStringsUnicode 2254 2219 -1.6% 1.02x (?)
StackPromo 21985 21958 -0.1% 1.00x (?)
StaticArray 8 8 +0.0% 1.00x
StrComplexWalk 1597 1597 +0.0% 1.00x
StrToInt 3040 2956 -2.8% 1.03x
StringBuilderLong 1121 1125 +0.4% 1.00x (?)
StringBuilderWithLongSubstring 1276 1280 +0.3% 1.00x (?)
StringComparison_abnormal 690 690 +0.0% 1.00x
StringComparison_ascii 927 914 -1.4% 1.01x
StringComparison_emoji 764 752 -1.6% 1.02x (?)
StringComparison_fastPrenormal 772 740 -4.1% 1.04x
StringComparison_latin1 603 579 -4.0% 1.04x
StringComparison_longSharedPrefix 855 851 -0.5% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 1510 1479 -2.1% 1.02x (?)
StringComparison_slowerPrenormal 1613 1597 -1.0% 1.01x (?)
StringComparison_zalgo 99652 100383 +0.7% 0.99x (?)
StringEdits 149534 151339 +1.2% 0.99x (?)
StringEnumRawValueInitialization 776 769 -0.9% 1.01x (?)
StringEqualPointerComparison 256 256 +0.0% 1.00x
StringFromLongWholeSubstring 19 19 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 19 19 +0.0% 1.00x
StringHasPrefixAscii 2003 1977 -1.3% 1.01x
StringHasPrefixUnicode 89262 88699 -0.6% 1.01x (?)
StringHasSuffixAscii 2028 2054 +1.3% 0.99x
StringHasSuffixUnicode 89832 89741 -0.1% 1.00x (?)
StringHashing_abnormal 1203 1203 +0.0% 1.00x
StringHashing_ascii 30 29 -3.3% 1.03x
StringHashing_emoji 1728 1699 -1.7% 1.02x (?)
StringHashing_fastPrenormal 7444 7564 +1.6% 0.98x (?)
StringHashing_latin1 2283 2311 +1.2% 0.99x (?)
StringHashing_longSharedPrefix 7095 7061 -0.5% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 1890 1844 -2.4% 1.02x (?)
StringHashing_slowerPrenormal 2458 2472 +0.6% 0.99x (?)
StringHashing_zalgo 3122 3135 +0.4% 1.00x (?)
StringInterpolation 8145 8127 -0.2% 1.00x (?)
StringInterpolationManySmallSegments 16511 16232 -1.7% 1.02x (?)
StringMatch 11092 10934 -1.4% 1.01x
StringRemoveDupes 433 436 +0.7% 0.99x (?)
StringUTF16Builder 2405 2387 -0.7% 1.01x (?)
StringUTF16SubstringBuilder 5118 5225 +2.1% 0.98x (?)
StringWalk 1388 1386 -0.1% 1.00x (?)
StringWithCString 38079 39994 +5.0% 0.95x
StringWordBuilder 2331 2226 -4.5% 1.05x
StringWordBuilderReservingCapacity 1753 1700 -3.0% 1.03x
SubstringComparable 12 12 +0.0% 1.00x
SubstringEqualString 569 565 -0.7% 1.01x (?)
SubstringEquatable 1337 1355 +1.3% 0.99x
SubstringFromLongString 9 9 +0.0% 1.00x
SubstringFromLongStringGeneric 66 66 +0.0% 1.00x
SuffixAnyCollection 25 25 +0.0% 1.00x
SuffixAnyCollectionLazy 19496 19554 +0.3% 1.00x (?)
SuffixAnySeqCRangeIter 3215 3220 +0.2% 1.00x (?)
SuffixAnySeqCRangeIterLazy 3214 3223 +0.3% 1.00x (?)
SuffixAnySeqCntRange 15 15 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 15 15 +0.0% 1.00x
SuffixAnySequence 4398 4404 +0.1% 1.00x (?)
SuffixAnySequenceLazy 4474 4486 +0.3% 1.00x (?)
SuffixCountableRange 10 10 +0.0% 1.00x
SuffixCountableRangeLazy 10 10 +0.0% 1.00x
SuffixSequence 3211 3235 +0.7% 0.99x (?)
SuffixSequenceLazy 3213 3232 +0.6% 0.99x
SumUsingReduce 91 91 +0.0% 1.00x
SumUsingReduceInto 91 91 +0.0% 1.00x
SuperChars 17963 17948 -0.1% 1.00x (?)
TwoSum 1316 1310 -0.5% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 279 280 +0.4% 1.00x (?)
UTF8Decode_InitDecoding 1219 1213 -0.5% 1.00x (?)
UTF8Decode_InitDecoding_ascii 584 587 +0.5% 0.99x (?)
UTF8Decode_InitFromBytes 1049 1055 +0.6% 0.99x (?)
UTF8Decode_InitFromBytes_ascii 438 442 +0.9% 0.99x (?)
UTF8Decode_InitFromData 1110 1104 -0.5% 1.01x (?)
UTF8Decode_InitFromData_ascii 625 599 -4.2% 1.04x (?)
Walsh 377 387 +2.7% 0.97x
WordCountHistogramASCII 7230 7107 -1.7% 1.02x
WordCountHistogramUTF16 10255 10125 -1.3% 1.01x (?)
WordCountUniqueASCII 1866 1851 -0.8% 1.01x (?)
WordCountUniqueUTF16 4120 4197 +1.9% 0.98x (?)
WordSplitASCII 8755 8907 +1.7% 0.98x (?)
WordSplitUTF16 10017 9870 -1.5% 1.01x (?)
XorLoop 344 344 +0.0% 1.00x

Unoptimized (Onone)

Regression (12)
TEST OLD NEW DELTA SPEEDUP
DictionaryKeysContainsNative 48 60 +25.0% 0.80x (?)
CharacterPropertiesStashedMemo 3999 4897 +22.5% 0.82x (?)
ArrayOfPOD 679 759 +11.8% 0.89x
ArrayOfGenericPOD2 959 1062 +10.7% 0.90x
CharIndexing_chinese_unicodeScalars_Backwards 237689 262531 +10.5% 0.91x (?)
DataReplaceSmallBuffer 7657 8432 +10.1% 0.91x (?)
CharIndexing_chinese_unicodeScalars 215943 236486 +9.5% 0.91x (?)
DictionarySubscriptDefaultMutationOfObjects 4746 5082 +7.1% 0.93x (?)
UTF8Decode_InitFromBytes_ascii 470 503 +7.0% 0.93x (?)
StrComplexWalk 6127 6516 +6.3% 0.94x
DictionarySwapOfObjects 17125 18110 +5.8% 0.95x (?)
StringBuilderLong 1308 1383 +5.7% 0.95x (?)
Improvement (9)
TEST OLD NEW DELTA SPEEDUP
StringBuilderWithLongSubstring 3166 2835 -10.5% 1.12x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 8372 7589 -9.4% 1.10x (?)
DictionaryKeysContainsCocoa 63 58 -7.9% 1.09x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 44630 41589 -6.8% 1.07x (?)
ObjectiveCBridgeFromNSStringForced 2700 2525 -6.5% 1.07x (?)
ObjectiveCBridgeToNSArray 13815 13102 -5.2% 1.05x (?)
Phonebook 14655 13910 -5.1% 1.05x
NSDictionaryCastToSwift 7676 7294 -5.0% 1.05x (?)
ObjectiveCBridgeFromNSString 2767 2633 -4.8% 1.05x (?)
No Changes (434)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4664 4671 +0.2% 1.00x (?)
AnyHashableWithAClass 96275 96166 -0.1% 1.00x (?)
Array2D 560288 560568 +0.0% 1.00x (?)
ArrayAppend 3965 3965 +0.0% 1.00x
ArrayAppendArrayOfInt 729 730 +0.1% 1.00x (?)
ArrayAppendAscii 24044 23954 -0.4% 1.00x (?)
ArrayAppendAsciiSubstring 63521 63686 +0.3% 1.00x (?)
ArrayAppendFromGeneric 733 733 +0.0% 1.00x
ArrayAppendGenericStructs 1276 1279 +0.2% 1.00x (?)
ArrayAppendLatin1 59151 57838 -2.2% 1.02x
ArrayAppendLatin1Substring 142927 143272 +0.2% 1.00x (?)
ArrayAppendLazyMap 148002 148235 +0.2% 1.00x
ArrayAppendOptionals 1274 1279 +0.4% 1.00x (?)
ArrayAppendRepeatCol 171280 169111 -1.3% 1.01x
ArrayAppendReserved 3733 3733 +0.0% 1.00x
ArrayAppendSequence 94619 95434 +0.9% 0.99x
ArrayAppendStrings 5737 5652 -1.5% 1.02x
ArrayAppendToFromGeneric 732 737 +0.7% 0.99x (?)
ArrayAppendToGeneric 736 740 +0.5% 0.99x (?)
ArrayAppendUTF16 58830 57799 -1.8% 1.02x
ArrayAppendUTF16Substring 141317 141339 +0.0% 1.00x (?)
ArrayInClass 5697 5682 -0.3% 1.00x
ArrayLiteral 1601 1606 +0.3% 1.00x (?)
ArrayOfGenericRef 9439 9485 +0.5% 1.00x (?)
ArrayOfRef 8630 8647 +0.2% 1.00x (?)
ArrayPlusEqualArrayOfInt 733 736 +0.4% 1.00x (?)
ArrayPlusEqualFiveElementCollection 204577 204429 -0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 200463 201587 +0.6% 0.99x (?)
ArrayPlusEqualThreeElements 7956 7964 +0.1% 1.00x (?)
ArraySubscript 95196 96043 +0.9% 0.99x
ArrayValueProp 3307 3293 -0.4% 1.00x (?)
ArrayValueProp2 13351 13359 +0.1% 1.00x (?)
ArrayValueProp3 3817 3807 -0.3% 1.00x (?)
ArrayValueProp4 3753 3777 +0.6% 0.99x (?)
BinaryFloatingPointPropertiesBinade 79 82 +3.8% 0.96x
BinaryFloatingPointPropertiesNextUp 120 123 +2.5% 0.98x
BinaryFloatingPointPropertiesUlp 117 117 +0.0% 1.00x
BitCount 8164 8168 +0.0% 1.00x (?)
ByteSwap 8745 8706 -0.4% 1.00x (?)
COWArrayGuaranteedParameterOverhead 12934 12558 -2.9% 1.03x (?)
COWTree 10381 10498 +1.1% 0.99x (?)
CSVParsing 2553099 2546638 -0.3% 1.00x (?)
CSVParsingAlt 1256060 1269726 +1.1% 0.99x (?)
CSVParsingAltIndices 2148684 2128345 -0.9% 1.01x (?)
CStringLongAscii 3774 3762 -0.3% 1.00x (?)
CStringLongNonAscii 2173 2245 +3.3% 0.97x
CStringShortAscii 5438 5440 +0.0% 1.00x (?)
Calculator 900 898 -0.2% 1.00x
CaptureProp 256609 260055 +1.3% 0.99x
ChainedFilterMap 204886 206207 +0.6% 0.99x (?)
CharIndexing_ascii_unicodeScalars 287244 284378 -1.0% 1.01x (?)
CharIndexing_ascii_unicodeScalars_Backwards 317690 320081 +0.8% 0.99x (?)
CharIndexing_japanese_unicodeScalars 336829 342299 +1.6% 0.98x (?)
CharIndexing_japanese_unicodeScalars_Backwards 377324 383180 +1.6% 0.98x (?)
CharIndexing_korean_unicodeScalars 272708 279796 +2.6% 0.97x (?)
CharIndexing_korean_unicodeScalars_Backwards 307409 309023 +0.5% 0.99x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 50357 50466 +0.2% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 54495 55665 +2.1% 0.98x (?)
CharIndexing_punctuated_unicodeScalars 62706 64430 +2.7% 0.97x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 68931 71007 +3.0% 0.97x (?)
CharIndexing_russian_unicodeScalars 234799 236643 +0.8% 0.99x (?)
CharIndexing_russian_unicodeScalars_Backwards 271424 265382 -2.2% 1.02x (?)
CharIndexing_tweet_unicodeScalars 615206 593025 -3.6% 1.04x (?)
CharIndexing_tweet_unicodeScalars_Backwards 629620 636650 +1.1% 0.99x (?)
CharIndexing_utf16_unicodeScalars 249006 250386 +0.6% 0.99x (?)
CharIndexing_utf16_unicodeScalars_Backwards 271545 270302 -0.5% 1.00x (?)
CharIteration_ascii_unicodeScalars 131517 133097 +1.2% 0.99x (?)
CharIteration_ascii_unicodeScalars_Backwards 221259 222099 +0.4% 1.00x (?)
CharIteration_chinese_unicodeScalars 99601 100101 +0.5% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 167735 168801 +0.6% 0.99x (?)
CharIteration_japanese_unicodeScalars 157563 158619 +0.7% 0.99x (?)
CharIteration_japanese_unicodeScalars_Backwards 265650 267513 +0.7% 0.99x (?)
CharIteration_korean_unicodeScalars 127276 128129 +0.7% 0.99x (?)
CharIteration_korean_unicodeScalars_Backwards 216158 216317 +0.1% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 23345 23577 +1.0% 0.99x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 38851 38847 -0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars 29310 29580 +0.9% 0.99x (?)
CharIteration_punctuated_unicodeScalars_Backwards 48816 49087 +0.6% 0.99x (?)
CharIteration_russian_unicodeScalars 109422 110351 +0.8% 0.99x (?)
CharIteration_russian_unicodeScalars_Backwards 184185 185547 +0.7% 0.99x (?)
CharIteration_tweet_unicodeScalars 259222 262249 +1.2% 0.99x (?)
CharIteration_tweet_unicodeScalars_Backwards 440198 441650 +0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars 111271 112527 +1.1% 0.99x (?)
CharIteration_utf16_unicodeScalars_Backwards 192916 193502 +0.3% 1.00x (?)
CharacterLiteralsLarge 5166 5144 -0.4% 1.00x
CharacterLiteralsSmall 652 654 +0.3% 1.00x
CharacterPropertiesFetch 5097 5204 +2.1% 0.98x (?)
CharacterPropertiesPrecomputed 3107 3135 +0.9% 0.99x (?)
CharacterPropertiesStashed 2136 2094 -2.0% 1.02x (?)
Chars 31365 31527 +0.5% 0.99x
ClassArrayGetter 862 863 +0.1% 1.00x (?)
Combos 2169 2108 -2.8% 1.03x (?)
DataAccessBytes 2111 2096 -0.7% 1.01x (?)
DataAppendArray 4639 4675 +0.8% 0.99x (?)
DataAppendBytes 4378 4448 +1.6% 0.98x (?)
DataAppendDataLargeToLarge 60334 60529 +0.3% 1.00x (?)
DataAppendDataLargeToMedium 31862 32030 +0.5% 0.99x (?)
DataAppendDataLargeToSmall 30865 30996 +0.4% 1.00x (?)
DataAppendDataMediumToLarge 33887 33803 -0.2% 1.00x (?)
DataAppendDataMediumToMedium 5792 5944 +2.6% 0.97x (?)
DataAppendDataMediumToSmall 5401 5544 +2.6% 0.97x (?)
DataAppendDataSmallToLarge 33287 33172 -0.3% 1.00x (?)
DataAppendDataSmallToMedium 5451 5475 +0.4% 1.00x (?)
DataAppendDataSmallToSmall 5372 5478 +2.0% 0.98x (?)
DataAppendSequence 1761996 1759923 -0.1% 1.00x (?)
DataCopyBytes 408 401 -1.7% 1.02x (?)
DataCount 200 201 +0.5% 1.00x
DataMutateBytes 4707 4624 -1.8% 1.02x (?)
DataReplaceLarge 33908 33129 -2.3% 1.02x (?)
DataReplaceLargeBuffer 51501 51831 +0.6% 0.99x (?)
DataReplaceMedium 6959 7294 +4.8% 0.95x (?)
DataReplaceMediumBuffer 9806 9701 -1.1% 1.01x (?)
DataReplaceSmall 5022 5091 +1.4% 0.99x (?)
DataReset 2538 2556 +0.7% 0.99x (?)
DataSetCount 510 500 -2.0% 1.02x (?)
DataSubscript 398 398 +0.0% 1.00x
DictOfArraysToArrayOfDicts 3131 3162 +1.0% 0.99x (?)
Dictionary 1926 1925 -0.1% 1.00x (?)
Dictionary2 1144 1141 -0.3% 1.00x (?)
Dictionary2OfObjects 3763 3778 +0.4% 1.00x (?)
Dictionary3 745 745 +0.0% 1.00x
Dictionary3OfObjects 1945 1925 -1.0% 1.01x (?)
Dictionary4 1069 1069 +0.0% 1.00x
Dictionary4Legacy 1326 1328 +0.2% 1.00x (?)
Dictionary4OfObjects 1605 1613 +0.5% 1.00x (?)
Dictionary4OfObjectsLegacy 1843 1852 +0.5% 1.00x (?)
DictionaryBridge 1126 1156 +2.7% 0.97x (?)
DictionaryCopy 274839 274910 +0.0% 1.00x (?)
DictionaryFilter 286723 286332 -0.1% 1.00x (?)
DictionaryGroup 3989 4006 +0.4% 1.00x (?)
DictionaryGroupOfObjects 6267 6366 +1.6% 0.98x (?)
DictionaryLiteral 7696 7775 +1.0% 0.99x (?)
DictionaryOfObjects 5202 5183 -0.4% 1.00x (?)
DictionaryRemove 15213 15258 +0.3% 1.00x (?)
DictionaryRemoveOfObjects 47513 47767 +0.5% 0.99x (?)
DictionarySubscriptDefaultMutation 1758 1764 +0.3% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2010 2004 -0.3% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 8275 8552 +3.3% 0.97x
DictionarySwap 4375 4379 +0.1% 1.00x (?)
DictionarySwapAt 29487 29507 +0.1% 1.00x (?)
DictionarySwapAtOfObjects 102041 102671 +0.6% 0.99x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 13925 13963 +0.3% 1.00x (?)
DropFirstAnyCollectionLazy 93670 92062 -1.7% 1.02x (?)
DropFirstAnySeqCRangeIter 21734 21607 -0.6% 1.01x
DropFirstAnySeqCRangeIterLazy 21346 21435 +0.4% 1.00x (?)
DropFirstAnySeqCntRange 13938 13950 +0.1% 1.00x (?)
DropFirstAnySeqCntRangeLazy 13894 13907 +0.1% 1.00x (?)
DropFirstAnySequence 11377 11650 +2.4% 0.98x
DropFirstAnySequenceLazy 11396 11592 +1.7% 0.98x
DropFirstArray 3307 3322 +0.5% 1.00x (?)
DropFirstArrayLazy 26647 26687 +0.2% 1.00x (?)
DropFirstCountableRange 310 310 +0.0% 1.00x
DropFirstCountableRangeLazy 31432 31469 +0.1% 1.00x (?)
DropFirstSequence 11121 11328 +1.9% 0.98x (?)
DropFirstSequenceLazy 11107 11340 +2.1% 0.98x (?)
DropLastAnyCollection 4651 4672 +0.5% 1.00x
DropLastAnyCollectionLazy 31035 31911 +2.8% 0.97x (?)
DropLastAnySeqCRangeIter 35365 35466 +0.3% 1.00x
DropLastAnySeqCRangeIterLazy 35436 35707 +0.8% 0.99x
DropLastAnySeqCntRange 4685 4659 -0.6% 1.01x
DropLastAnySeqCntRangeLazy 4649 4684 +0.8% 0.99x (?)
DropLastAnySequence 26326 26370 +0.2% 1.00x (?)
DropLastAnySequenceLazy 26214 26453 +0.9% 0.99x (?)
DropLastCountableRange 107 107 +0.0% 1.00x
DropLastCountableRangeLazy 10523 10527 +0.0% 1.00x (?)
DropLastSequence 26059 26142 +0.3% 1.00x (?)
DropLastSequenceLazy 26126 26540 +1.6% 0.98x (?)
DropWhileAnyCollection 17988 17978 -0.1% 1.00x (?)
DropWhileAnyCollectionLazy 20288 20345 +0.3% 1.00x
DropWhileAnySeqCRangeIter 22583 22440 -0.6% 1.01x (?)
DropWhileAnySeqCRangeIterLazy 20169 20190 +0.1% 1.00x (?)
DropWhileAnySeqCntRange 17945 18023 +0.4% 1.00x
DropWhileAnySeqCntRangeLazy 20162 20216 +0.3% 1.00x (?)
DropWhileAnySequence 12107 12293 +1.5% 0.98x
DropWhileAnySequenceLazy 11083 11166 +0.7% 0.99x (?)
DropWhileArrayLazy 12283 12339 +0.5% 1.00x
DropWhileCountableRange 4562 4527 -0.8% 1.01x
DropWhileCountableRangeLazy 20252 20113 -0.7% 1.01x
DropWhileSequence 11773 11960 +1.6% 0.98x
DropWhileSequenceLazy 10783 10860 +0.7% 0.99x
EqualStringSubstring 67 65 -3.0% 1.03x
EqualSubstringString 66 65 -1.5% 1.02x
EqualSubstringSubstring 67 66 -1.5% 1.02x
EqualSubstringSubstringGenericEquatable 53 53 +0.0% 1.00x
ErrorHandling 4625 4610 -0.3% 1.00x (?)
ExclusivityGlobal 164 172 +4.9% 0.95x
ExclusivityIndependent 65 66 +1.5% 0.98x (?)
FatCompactMap 258744 258657 -0.0% 1.00x (?)
FilterEvenUsingReduce 3238 3221 -0.5% 1.01x (?)
FilterEvenUsingReduceInto 1642 1643 +0.1% 1.00x (?)
FloatingPointPrinting_Double_description_small 19935 19934 -0.0% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 30360 30127 -0.8% 1.01x (?)
FloatingPointPrinting_Double_interpolated 86223 83428 -3.2% 1.03x (?)
FloatingPointPrinting_Float80_description_small 26305 26461 +0.6% 0.99x (?)
FloatingPointPrinting_Float80_description_uniform 53399 52350 -2.0% 1.02x (?)
FloatingPointPrinting_Float80_interpolated 107598 106048 -1.4% 1.01x (?)
FloatingPointPrinting_Float_description_small 5880 6027 +2.5% 0.98x
FloatingPointPrinting_Float_description_uniform 15330 15259 -0.5% 1.00x
FloatingPointPrinting_Float_interpolated 62041 61293 -1.2% 1.01x (?)
FrequenciesUsingReduce 9700 9805 +1.1% 0.99x (?)
FrequenciesUsingReduceInto 2815 2842 +1.0% 0.99x (?)
Hanoi 17390 17289 -0.6% 1.01x
HashTest 18563 18828 +1.4% 0.99x (?)
Histogram 5815 5646 -2.9% 1.03x (?)
Integrate 527 528 +0.2% 1.00x
IterateData 4460 4464 +0.1% 1.00x (?)
Join 168 163 -3.0% 1.03x
LazilyFilteredArrayContains 659871 665207 +0.8% 0.99x (?)
LazilyFilteredArrays 1280695 1293615 +1.0% 0.99x
LazilyFilteredRange 478578 481570 +0.6% 0.99x
LessSubstringSubstring 66 66 +0.0% 1.00x
LessSubstringSubstringGenericComparable 53 54 +1.9% 0.98x
LinkedList 29104 29160 +0.2% 1.00x (?)
LuhnAlgoEager 5159 5105 -1.0% 1.01x (?)
LuhnAlgoLazy 5051 5179 +2.5% 0.98x (?)
MapReduce 22745 22557 -0.8% 1.01x (?)
MapReduceAnyCollection 22451 22540 +0.4% 1.00x (?)
MapReduceAnyCollectionShort 32348 32613 +0.8% 0.99x (?)
MapReduceClass 25959 26133 +0.7% 0.99x (?)
MapReduceClassShort 35267 36097 +2.4% 0.98x (?)
MapReduceLazyCollection 19994 20182 +0.9% 0.99x (?)
MapReduceLazyCollectionShort 29419 29563 +0.5% 1.00x (?)
MapReduceLazySequence 18069 18271 +1.1% 0.99x (?)
MapReduceSequence 26963 27189 +0.8% 0.99x
MapReduceShort 31808 32558 +2.4% 0.98x (?)
MapReduceShortString 191 195 +2.1% 0.98x (?)
MapReduceString 1532 1542 +0.7% 0.99x (?)
Memset 40435 40454 +0.0% 1.00x (?)
MonteCarloE 1006167 1020985 +1.5% 0.99x (?)
MonteCarloPi 4585483 4618165 +0.7% 0.99x (?)
NSError 541 534 -1.3% 1.01x (?)
NSStringConversion 664 660 -0.6% 1.01x
NibbleSort 454891 458408 +0.8% 0.99x (?)
NopDeinit 171164 178756 +4.4% 0.96x
ObjectAllocation 1112 1113 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 25315 25947 +2.5% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 45111 43328 -4.0% 1.04x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 106441 106679 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 45748 47608 +4.1% 0.96x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 5530 5308 -4.0% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 69506 72292 +4.0% 0.96x (?)
ObjectiveCBridgeStubDataAppend 6130 5938 -3.1% 1.03x
ObjectiveCBridgeStubDateMutation 693 695 +0.3% 1.00x (?)
ObjectiveCBridgeStubFromArrayOfNSString 29799 30809 +3.4% 0.97x (?)
ObjectiveCBridgeStubFromNSDate 6148 6154 +0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSString 971 933 -3.9% 1.04x (?)
ObjectiveCBridgeStubFromNSStringRef 184 184 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2733 2814 +3.0% 0.97x (?)
ObjectiveCBridgeStubNSDateMutationRef 14217 14021 -1.4% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString 35203 35923 +2.0% 0.98x (?)
ObjectiveCBridgeStubToNSDate 14200 14201 +0.0% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3136 3113 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSString 2180 2172 -0.4% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 138 137 -0.7% 1.01x (?)
ObjectiveCBridgeStubURLAppendPath 262300 265871 +1.4% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef 264076 272139 +3.1% 0.97x (?)
ObjectiveCBridgeToNSDictionary 25706 24888 -3.2% 1.03x (?)
ObjectiveCBridgeToNSSet 16562 16868 +1.8% 0.98x (?)
ObjectiveCBridgeToNSString 485 486 +0.2% 1.00x
ObserverClosure 5770 5788 +0.3% 1.00x (?)
ObserverForwarderStruct 3724 3918 +5.2% 0.95x (?)
ObserverPartiallyAppliedMethod 7072 7092 +0.3% 1.00x (?)
ObserverUnappliedMethod 7252 7243 -0.1% 1.00x (?)
OpaqueConsumingUsers 12041 12037 -0.0% 1.00x (?)
OpenClose 481 478 -0.6% 1.01x
PartialApplyDynamicType 36584 36075 -1.4% 1.01x (?)
PointerArithmetics 113003 107893 -4.5% 1.05x
PolymorphicCalls 2194 2221 +1.2% 0.99x (?)
PopFrontArray 4235 4294 +1.4% 0.99x
PopFrontArrayGeneric 4670 4678 +0.2% 1.00x (?)
PopFrontUnsafePointer 10062 10070 +0.1% 1.00x (?)
PrefixAnyCollection 13946 13957 +0.1% 1.00x (?)
PrefixAnyCollectionLazy 91307 92539 +1.3% 0.99x (?)
PrefixAnySeqCRangeIter 17250 17201 -0.3% 1.00x
PrefixAnySeqCRangeIterLazy 17301 17220 -0.5% 1.00x (?)
PrefixAnySeqCntRange 13964 13969 +0.0% 1.00x (?)
PrefixAnySeqCntRangeLazy 13986 13922 -0.5% 1.00x
PrefixAnySequence 9399 9503 +1.1% 0.99x (?)
PrefixAnySequenceLazy 9341 9545 +2.2% 0.98x (?)
PrefixArray 3362 3363 +0.0% 1.00x (?)
PrefixArrayLazy 26637 26711 +0.3% 1.00x (?)
PrefixCountableRange 309 310 +0.3% 1.00x
PrefixCountableRangeLazy 31403 31447 +0.1% 1.00x (?)
PrefixSequence 8956 9170 +2.4% 0.98x (?)
PrefixSequenceLazy 9117 9272 +1.7% 0.98x
PrefixWhileAnyCollection 25988 26063 +0.3% 1.00x (?)
PrefixWhileAnyCollectionLazy 17236 17105 -0.8% 1.01x (?)
PrefixWhileAnySeqCRangeIter 29945 30091 +0.5% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 16639 16690 +0.3% 1.00x
PrefixWhileAnySeqCntRange 25971 26051 +0.3% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 16987 16885 -0.6% 1.01x (?)
PrefixWhileAnySequence 23178 23313 +0.6% 0.99x (?)
PrefixWhileAnySequenceLazy 9749 9952 +2.1% 0.98x
PrefixWhileArray 9344 9381 +0.4% 1.00x
PrefixWhileArrayLazy 10797 10839 +0.4% 1.00x
PrefixWhileCountableRange 12866 12794 -0.6% 1.01x
PrefixWhileCountableRangeLazy 16793 16658 -0.8% 1.01x
PrefixWhileSequence 22681 22911 +1.0% 0.99x (?)
PrefixWhileSequenceLazy 9528 9687 +1.7% 0.98x (?)
Prims 8181 8301 +1.5% 0.99x (?)
PrimsSplit 8279 8348 +0.8% 0.99x (?)
QueueConcrete 12647 12649 +0.0% 1.00x (?)
QueueGeneric 16440 16555 +0.7% 0.99x
RC4 14545 14525 -0.1% 1.00x (?)
RGBHistogram 20579 20548 -0.2% 1.00x (?)
RGBHistogramOfObjects 69350 69957 +0.9% 0.99x (?)
Radix2CooleyTukey 37328 37286 -0.1% 1.00x (?)
Radix2CooleyTukeyf 31929 31827 -0.3% 1.00x (?)
RandomDoubleDef 81389 84913 +4.3% 0.96x (?)
RandomDoubleLCG 52846 52459 -0.7% 1.01x (?)
RandomIntegersDef 38566 38730 +0.4% 1.00x (?)
RandomIntegersLCG 28822 29025 +0.7% 0.99x (?)
RandomShuffleDef 1946399 1949793 +0.2% 1.00x (?)
RandomShuffleLCG 1283353 1286850 +0.3% 1.00x (?)
RangeAssignment 2574 2482 -3.6% 1.04x
RangeIterationSigned 12895 13213 +2.5% 0.98x
RangeReplaceableCollectionPlusDefault 9234 9485 +2.7% 0.97x (?)
RecursiveOwnedParameter 5524 5479 -0.8% 1.01x
RemoveWhereFilterInts 1843 1845 +0.1% 1.00x (?)
RemoveWhereFilterString 1207 1201 -0.5% 1.00x (?)
RemoveWhereFilterStrings 2320 2323 +0.1% 1.00x (?)
RemoveWhereMoveInts 3010 3013 +0.1% 1.00x (?)
RemoveWhereMoveStrings 3477 3484 +0.2% 1.00x (?)
RemoveWhereQuadraticInts 7574 7581 +0.1% 1.00x (?)
RemoveWhereQuadraticString 2317 2325 +0.3% 1.00x (?)
RemoveWhereQuadraticStrings 9050 9066 +0.2% 1.00x (?)
RemoveWhereSwapInts 5385 5394 +0.2% 1.00x (?)
RemoveWhereSwapStrings 6027 6036 +0.1% 1.00x
ReversedArray 11313 11578 +2.3% 0.98x
ReversedBidirectional 46815 47303 +1.0% 0.99x (?)
ReversedDictionary 20189 20328 +0.7% 0.99x (?)
RomanNumbers 1206996 1243505 +3.0% 0.97x (?)
SequenceAlgosAnySequence 11781 11828 +0.4% 1.00x
SequenceAlgosArray 654801 658980 +0.6% 0.99x
SequenceAlgosContiguousArray 274102 272744 -0.5% 1.00x
SequenceAlgosList 7830 7883 +0.7% 0.99x
SequenceAlgosRange 1147865 1153444 +0.5% 1.00x
SequenceAlgosUnfoldSequence 5778 5902 +2.1% 0.98x (?)
SetExclusiveOr 14630 14675 +0.3% 1.00x (?)
SetExclusiveOr_OfObjects 37893 38252 +0.9% 0.99x (?)
SetIntersect 6131 6154 +0.4% 1.00x
SetIntersect_OfObjects 9577 9619 +0.4% 1.00x (?)
SetIsSubsetOf 1068 1066 -0.2% 1.00x (?)
SetIsSubsetOf_OfObjects 2019 2033 +0.7% 0.99x (?)
SetUnion 10626 10715 +0.8% 0.99x
SetUnion_OfObjects 27093 27292 +0.7% 0.99x (?)
SevenBoom 918 916 -0.2% 1.00x (?)
Sim2DArray 39319 39330 +0.0% 1.00x (?)
SortLargeExistentials 8794 8732 -0.7% 1.01x
SortLettersInPlace 1403 1399 -0.3% 1.00x (?)
SortSortedStrings 806 810 +0.5% 1.00x
SortStrings 1687 1665 -1.3% 1.01x
SortStringsUnicode 2576 2481 -3.7% 1.04x
StackPromo 83619 83103 -0.6% 1.01x (?)
StaticArray 2337 2329 -0.3% 1.00x (?)
StrToInt 69629 71117 +2.1% 0.98x (?)
StringAdder 683 661 -3.2% 1.03x
StringBuilder 4487 4476 -0.2% 1.00x (?)
StringBuilderSmallReservingCapacity 4507 4497 -0.2% 1.00x (?)
StringComparison_abnormal 1158 1149 -0.8% 1.01x
StringComparison_ascii 7885 7940 +0.7% 0.99x
StringComparison_emoji 1779 1772 -0.4% 1.00x (?)
StringComparison_fastPrenormal 4340 4363 +0.5% 0.99x (?)
StringComparison_latin1 3391 3390 -0.0% 1.00x (?)
StringComparison_longSharedPrefix 2096 2109 +0.6% 0.99x (?)
StringComparison_nonBMPSlowestPrenormal 3300 3293 -0.2% 1.00x (?)
StringComparison_slowerPrenormal 3704 3695 -0.2% 1.00x (?)
StringComparison_zalgo 102177 102711 +0.5% 0.99x (?)
StringEdits 339034 339959 +0.3% 1.00x (?)
StringEnumRawValueInitialization 19106 18700 -2.1% 1.02x
StringEqualPointerComparison 1524 1547 +1.5% 0.99x (?)
StringFromLongWholeSubstring 20 20 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 176 177 +0.6% 0.99x
StringHasPrefixAscii 2917 2917 +0.0% 1.00x
StringHasPrefixUnicode 90541 90073 -0.5% 1.01x (?)
StringHasSuffixAscii 2953 2976 +0.8% 0.99x
StringHasSuffixUnicode 90874 90974 +0.1% 1.00x (?)
StringHashing_abnormal 1288 1288 +0.0% 1.00x
StringHashing_ascii 189 190 +0.5% 0.99x
StringHashing_emoji 1908 1938 +1.6% 0.98x (?)
StringHashing_fastPrenormal 7695 7793 +1.3% 0.99x (?)
StringHashing_latin1 2480 2504 +1.0% 0.99x (?)
StringHashing_longSharedPrefix 7225 7212 -0.2% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2095 2077 -0.9% 1.01x (?)
StringHashing_slowerPrenormal 2627 2646 +0.7% 0.99x (?)
StringHashing_zalgo 3226 3234 +0.2% 1.00x (?)
StringInterpolation 10543 10202 -3.2% 1.03x (?)
StringInterpolationManySmallSegments 16992 16756 -1.4% 1.01x (?)
StringInterpolationSmall 5435 5333 -1.9% 1.02x (?)
StringMatch 35069 35315 +0.7% 0.99x (?)
StringRemoveDupes 646 646 +0.0% 1.00x
StringUTF16Builder 7019 6868 -2.2% 1.02x (?)
StringUTF16SubstringBuilder 18676 19234 +3.0% 0.97x (?)
StringWalk 11438 11784 +3.0% 0.97x
StringWithCString 37043 38682 +4.4% 0.96x
StringWordBuilder 2210 2167 -1.9% 1.02x
StringWordBuilderReservingCapacity 1847 1860 +0.7% 0.99x
SubstringComparable 1418 1431 +0.9% 0.99x (?)
SubstringEqualString 1599 1634 +2.2% 0.98x
SubstringEquatable 5154 5171 +0.3% 1.00x (?)
SubstringFromLongString 13 13 +0.0% 1.00x
SubstringFromLongStringGeneric 93 93 +0.0% 1.00x
SuffixAnyCollection 4660 4665 +0.1% 1.00x (?)
SuffixAnyCollectionLazy 31091 31187 +0.3% 1.00x (?)
SuffixAnySeqCRangeIter 31891 32004 +0.4% 1.00x (?)
SuffixAnySeqCRangeIterLazy 31927 32053 +0.4% 1.00x (?)
SuffixAnySeqCntRange 4652 4664 +0.3% 1.00x (?)
SuffixAnySeqCntRangeLazy 4642 4661 +0.4% 1.00x (?)
SuffixAnySequence 22631 22806 +0.8% 0.99x (?)
SuffixAnySequenceLazy 22717 22899 +0.8% 0.99x (?)
SuffixCountableRange 107 107 +0.0% 1.00x
SuffixCountableRangeLazy 10512 10519 +0.1% 1.00x (?)
SuffixSequence 22463 22657 +0.9% 0.99x (?)
SuffixSequenceLazy 22556 22759 +0.9% 0.99x (?)
SumUsingReduce 139222 140507 +0.9% 0.99x
SumUsingReduceInto 133592 136549 +2.2% 0.98x
SuperChars 81389 82653 +1.6% 0.98x (?)
TwoSum 3097 3108 +0.4% 1.00x (?)
TypeFlood 180 185 +2.8% 0.97x (?)
UTF8Decode 25802 25979 +0.7% 0.99x
UTF8Decode_InitDecoding 1261 1278 +1.3% 0.99x (?)
UTF8Decode_InitDecoding_ascii 800 776 -3.0% 1.03x (?)
UTF8Decode_InitFromBytes 1073 1066 -0.7% 1.01x (?)
UTF8Decode_InitFromData 1121 1126 +0.4% 1.00x (?)
UTF8Decode_InitFromData_ascii 635 662 +4.3% 0.96x (?)
Walsh 11103 11122 +0.2% 1.00x (?)
WordCountHistogramASCII 32938 32909 -0.1% 1.00x (?)
WordCountHistogramUTF16 37627 37773 +0.4% 1.00x (?)
WordCountUniqueASCII 6376 6405 +0.5% 1.00x
WordCountUniqueUTF16 8599 8697 +1.1% 0.99x (?)
WordSplitASCII 12253 12102 -1.2% 1.01x (?)
WordSplitUTF16 13826 13204 -4.5% 1.05x (?)
XorLoop 21339 21383 +0.2% 1.00x (?)
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 8-Core Intel Xeon E5
  Processor Speed: 3 GHz
  Number of Processors: 1
  Total Number of Cores: 8
  L2 Cache (per Core): 256 KB
  L3 Cache: 25 MB
  Memory: 64 GB

@lorentey
Copy link
Member Author

lorentey commented Jul 5, 2018

I added new microbenchmarks to help us track performance. Copying elements in bulk out of an _SwiftDeferredNSDictionary is now ~5 times faster:

Improvement (1)
TEST OLD NEW DELTA SPEEDUP
DictionaryBridgeToObjC_BulkAccess 699 143 -79.5% 4.89x
No Changes (2)
TEST OLD NEW DELTA SPEEDUP
DictionaryBridgeToObjC_Access 774 760 -1.8% 1.02x (?)
DictionaryBridgeToObjC_Bridge 18 18 +0.0% 1.00x

@lorentey
Copy link
Member Author

lorentey commented Jul 5, 2018

@swift-ci test

@@ -2961,6 +2975,7 @@ final internal class _SwiftDeferredNSDictionary<Key: Hashable, Value>
// keys null, objects nonnull
for position in 0..<bucketCount {
if bridgedBuffer.isInitializedEntry(at: position) {
guard i < count else { break }
Copy link
Contributor

Choose a reason for hiding this comment

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

you could eke out a one less loop iteration by checking this after you increment i -- and adding an early out above for count == 0

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! It can often be more than one iteration, too, since the loop skips over empty buckets.

@moiseev
Copy link
Contributor

moiseev commented Jul 5, 2018

:shipit:

…ementations

This breaks out of the loop immediately when the last slot has been filled in the output buffer, skipping a final sequence of iterations over empty buckets.
@lancep lancep self-requested a review July 5, 2018 17:27
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.

LGTM! 🍔

@lorentey
Copy link
Member Author

lorentey commented Jul 5, 2018

@swift-ci test and merge

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.

6 participants