Skip to content

[WIP] Hash table unification #18790

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

Closed
wants to merge 42 commits into from

Conversation

lorentey
Copy link
Member

  • Extract low-level hash table operations into a type-agnostic _HashTable struct, parts of which can potentially be made resilient.
  • Store 7 additional bits of the hash value directly in each entry's metadata field. (The hope is that this will allow us to use a much higher max load factor, by making collision chains dramatically cheaper.)
  • Updated storage class hierarchy and internal storage layout for Set and (soon) Dictionary.
  • New representation for the type-punned empty singleton storage.
  • Slightly less memory overhead for deferred bridging. (This is especially relevant for Dictionary where only one of the element types may need non-verbatim bridging.)

This hasn't been fully debugged yet, and also needs to be extensively benchmarked/fine-tuned.

An lldb data formatter update will need to land before merging this PR.

@lorentey lorentey force-pushed the hashtable-unification branch from 17afb09 to abab947 Compare August 17, 2018 14:24

extension _SwiftEmptySetStorage: _NSSetCore {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI we did find it worthwhile in Foundation to have 1 element variants as well in addition to this strategy of a zero element container.

Couldn't this be a singleton?

Copy link
Member Author

@lorentey lorentey Aug 17, 2018

Choose a reason for hiding this comment

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

This is a singleton -- the sole instance is created by the Swift runtime in _swiftEmptySetStorage (lowercased). (It's done by the runtime because we can't currently define globals in the stdlib.) It'd be a good idea to name the class _SwiftEmptySetSingleton; I wonder why I haven't thought of that before!

Our storage classes themselves are really simple -- they are really just there for reference counting their tail-allocated buffers. (And to implement the NSSet/NSDictionary/NSArray interfaces, which is merely a bridging optimization, eliminating the need for allocating a wrapper object around them.)

Most of the native logic is in the wrapper structs/enums that make up most of this file. We don't use subtype polymorphism on the native Swift path, which makes things super efficient as long as we only have an extremely limited number of inlinable fast paths. (1 in most cases, except String which comes in a dozen or so flavors.) :)

Every additional case has to be individually checked for at runtime, so it's only worth adding a new case if it brings a huge potential improvement. Since storage is tail-allocated, there wouldn't be much difference between a single-element _SwiftNativeSetStorage and a dedicated _SwiftSingleElementSetStorage class. (Memory overhead might be smaller if the latter removes the hash table bookkeeping info, but that means Set operations wouldn't be inlinable at all, or they all need to start with a dynamic type check -- both of which would probably slow things down too much.)

Instead of defining a single-element storage class, it might be interesting to create a small set representation, where an element can be stored directly in place of the storage reference. (As long as it fits in a pointer-sized word minus some bits, of course.) However, this wouldn't work for Dictionary, so it's probably not worth trying it.

Another similar idea I'm experimenting with is to disable hashing altogether for small sets and dictionaries (say, less than 4-16 elements) -- basically reverting them to unsorted arrays. This could have a large impact, as calculating a single hash value can be many times slower than comparing unequal elements. However, adding that tiny extra condition to every operation changes inlining behavior such that I see significant regressions in Dictionary performance. This PR significantly shrinks Set's inlinable code size; we'll see if this will make this a more viable idea!

fatalError("""
Duplicate elements of type '\(elementType)' were found in a Set.
This usually means that either the type violates Hashable's requirements, or
that members of such a set were mutated after insertion.
Copy link
Contributor

Choose a reason for hiding this comment

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

the case we have seen often in Foundation is where an element of a NSMutableSet has a non-stable hash value. is this function breakpointable to help developers figure out why they are getting this failure?

Copy link
Member Author

Choose a reason for hiding this comment

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

While the function is declared internal, the @usableFromInline attribute means there will still be a symbol generated for it -- so it'll be breakpointable. (It essentially makes the symbol public on the ABI level, so lldb will see it.)

I'll have to play with this a little to make sure the idea is sound. Multiline error messages may cause issues. Also, I think fatalError generates a bunch of stack frames before aborting, so I'm not sure if this will be as visible as I hope. Plus I think it may be useful to print one of the duplicate values (passed in as an Any parameter), along with the type -- although that may be a step too far.

@lorentey lorentey force-pushed the hashtable-unification branch 2 times, most recently from e77323b to 3834a2a Compare August 20, 2018 21:05
@lorentey
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - eea08afef8daa32eb8d1eacc17c674d119665f1b

@lorentey
Copy link
Member Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - eea08afef8daa32eb8d1eacc17c674d119665f1b

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (14)
TEST OLD NEW DELTA SPEEDUP
SetIntersect 585 943 +61.2% 0.62x
SetExclusiveOr 4859 6855 +41.1% 0.71x
CharacterPropertiesStashedMemo 1415 1875 +32.5% 0.75x
SetUnion 4143 5360 +29.4% 0.77x
Sim2DArray 312 399 +27.9% 0.78x
CharacterPropertiesPrecomputed 964 1132 +17.4% 0.85x
RangeIterationSigned 171 200 +17.0% 0.86x
SetUnion_OfObjects 9638 10930 +13.4% 0.88x
SetIsSubsetOf 317 359 +13.2% 0.88x
SetExclusiveOr_OfObjects 11198 12581 +12.4% 0.89x
IterateData 1445 1611 +11.5% 0.90x
SetIntersect_OfObjects 1605 1769 +10.2% 0.91x
SetIsSubsetOf_OfObjects 429 463 +7.9% 0.93x
RemoveWhereMoveInts 14 15 +7.1% 0.93x (?)
Improvement (15)
TEST OLD NEW DELTA SPEEDUP
COWArrayGuaranteedParameterOverhead 11547 10039 -13.1% 1.15x
ChainedFilterMap 1408 1244 -11.6% 1.13x
FatCompactMap 1407 1247 -11.4% 1.13x
Calculator 218 199 -8.7% 1.10x
OpenClose 71 65 -8.5% 1.09x
StringHashing_ascii 36 33 -8.3% 1.09x
DataCount 37 34 -8.1% 1.09x
RandomDoubleDef 28494 26638 -6.5% 1.07x
ObjectiveCBridgeFromNSArrayAnyObjectForced 4712 4415 -6.3% 1.07x (?)
LazilyFilteredArrayContains 35502 33472 -5.7% 1.06x
ByteSwap 106 100 -5.7% 1.06x
BinaryFloatingPointPropertiesUlp 37 35 -5.4% 1.06x
ObjectiveCBridgeStubFromArrayOfNSString2 3447 3268 -5.2% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 68371 64920 -5.0% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 3803 3616 -4.9% 1.05x (?)
No Changes (418)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3592 3602 +0.3% 1.00x (?)
AnyHashableWithAClass 89076 88707 -0.4% 1.00x (?)
Array2D 2716 2717 +0.0% 1.00x (?)
ArrayAppend 798 792 -0.8% 1.01x (?)
ArrayAppendArrayOfInt 790 783 -0.9% 1.01x (?)
ArrayAppendAscii 3887 3836 -1.3% 1.01x (?)
ArrayAppendAsciiSubstring 24922 24861 -0.2% 1.00x (?)
ArrayAppendFromGeneric 783 793 +1.3% 0.99x (?)
ArrayAppendGenericStructs 1426 1422 -0.3% 1.00x (?)
ArrayAppendLatin1 39483 39145 -0.9% 1.01x (?)
ArrayAppendLatin1Substring 140556 139647 -0.6% 1.01x (?)
ArrayAppendLazyMap 1335 1341 +0.4% 1.00x (?)
ArrayAppendOptionals 1398 1428 +2.1% 0.98x (?)
ArrayAppendRepeatCol 1338 1337 -0.1% 1.00x (?)
ArrayAppendReserved 525 527 +0.4% 1.00x (?)
ArrayAppendSequence 1111 1112 +0.1% 1.00x (?)
ArrayAppendStrings 6334 6204 -2.1% 1.02x
ArrayAppendToFromGeneric 792 787 -0.6% 1.01x (?)
ArrayAppendToGeneric 790 791 +0.1% 1.00x (?)
ArrayAppendUTF16 40079 39196 -2.2% 1.02x
ArrayAppendUTF16Substring 139612 138935 -0.5% 1.00x (?)
ArrayInClass 85 85 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 151 151 +0.0% 1.00x
ArrayOfGenericRef 4355 4390 +0.8% 0.99x (?)
ArrayOfPOD 181 185 +2.2% 0.98x (?)
ArrayOfRef 4321 4364 +1.0% 0.99x (?)
ArrayPlusEqualArrayOfInt 797 797 +0.0% 1.00x
ArrayPlusEqualFiveElementCollection 4189 4223 +0.8% 0.99x (?)
ArrayPlusEqualSingleElementCollection 790 793 +0.4% 1.00x (?)
ArrayPlusEqualThreeElements 1626 1665 +2.4% 0.98x (?)
ArraySubscript 1563 1559 -0.3% 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 31 31 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 29 28 -3.4% 1.04x
BitCount 169 169 +0.0% 1.00x
COWTree 3576 3602 +0.7% 0.99x (?)
CSVParsing2 1711 1713 +0.1% 1.00x (?)
CSVParsingAlt2 1767 1765 -0.1% 1.00x (?)
CSVParsingAltIndices2 765 758 -0.9% 1.01x (?)
CStringLongAscii 3282 3281 -0.0% 1.00x (?)
CStringLongNonAscii 2101 2101 +0.0% 1.00x
CStringShortAscii 3129 3177 +1.5% 0.98x (?)
CaptureProp 4063 4034 -0.7% 1.01x (?)
CharIndexing_ascii_unicodeScalars 16644 16616 -0.2% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 16329 16437 +0.7% 0.99x
CharIndexing_chinese_unicodeScalars 12611 12585 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12368 12365 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 19915 19885 -0.2% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 19565 19561 -0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars 16140 16110 -0.2% 1.00x
CharIndexing_korean_unicodeScalars_Backwards 15828 15857 +0.2% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 3038 3010 -0.9% 1.01x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2957 2970 +0.4% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 3793 3768 -0.7% 1.01x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3697 3710 +0.4% 1.00x (?)
CharIndexing_russian_unicodeScalars 13869 13847 -0.2% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 13607 13699 +0.7% 0.99x
CharIndexing_tweet_unicodeScalars 32774 32737 -0.1% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31579 31609 +0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars 22803 22851 +0.2% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 23003 23007 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars 20568 20378 -0.9% 1.01x
CharIteration_ascii_unicodeScalars_Backwards 15479 15485 +0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 15574 15433 -0.9% 1.01x
CharIteration_chinese_unicodeScalars_Backwards 11727 11720 -0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars 24622 24422 -0.8% 1.01x (?)
CharIteration_japanese_unicodeScalars_Backwards 18534 18526 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 19942 19766 -0.9% 1.01x
CharIteration_korean_unicodeScalars_Backwards 15011 15011 +0.0% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars 3699 3659 -1.1% 1.01x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2805 2805 +0.0% 1.00x
CharIteration_punctuated_unicodeScalars 4634 4589 -1.0% 1.01x
CharIteration_punctuated_unicodeScalars_Backwards 3509 3509 +0.0% 1.00x
CharIteration_russian_unicodeScalars 17151 16976 -1.0% 1.01x
CharIteration_russian_unicodeScalars_Backwards 12901 12896 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 40546 40298 -0.6% 1.01x
CharIteration_tweet_unicodeScalars_Backwards 30578 30570 -0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars 27661 27691 +0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 18487 18548 +0.3% 1.00x (?)
CharacterLiteralsLarge 5878 5864 -0.2% 1.00x (?)
CharacterLiteralsSmall 220 217 -1.4% 1.01x
CharacterPropertiesFetch 4490 4530 +0.9% 0.99x (?)
CharacterPropertiesStashed 1680 1668 -0.7% 1.01x (?)
Chars2 2625 2635 +0.4% 1.00x
ClassArrayGetter2 124 124 +0.0% 1.00x
Combos 496 493 -0.6% 1.01x (?)
DataAccessBytes 1137 1148 +1.0% 0.99x (?)
DataAppendArray 5352 5440 +1.6% 0.98x (?)
DataAppendBytes 5058 5216 +3.1% 0.97x (?)
DataAppendDataLargeToLarge 68678 66773 -2.8% 1.03x (?)
DataAppendDataLargeToMedium 35317 34938 -1.1% 1.01x (?)
DataAppendDataLargeToSmall 34399 34205 -0.6% 1.01x (?)
DataAppendDataMediumToLarge 37708 37431 -0.7% 1.01x (?)
DataAppendDataMediumToMedium 6577 6495 -1.2% 1.01x (?)
DataAppendDataMediumToSmall 5874 5881 +0.1% 1.00x (?)
DataAppendDataSmallToLarge 37188 36588 -1.6% 1.02x (?)
DataAppendDataSmallToMedium 6271 6222 -0.8% 1.01x (?)
DataAppendDataSmallToSmall 5704 5705 +0.0% 1.00x (?)
DataAppendSequence 20801 21146 +1.7% 0.98x (?)
DataCopyBytes 458 456 -0.4% 1.00x (?)
DataMutateBytes 3909 4111 +5.2% 0.95x (?)
DataReplaceLarge 36739 36463 -0.8% 1.01x (?)
DataReplaceLargeBuffer 58857 57228 -2.8% 1.03x (?)
DataReplaceMedium 8173 7871 -3.7% 1.04x (?)
DataReplaceMediumBuffer 12146 12348 +1.7% 0.98x (?)
DataReplaceSmall 5703 5586 -2.1% 1.02x (?)
DataReplaceSmallBuffer 9165 8961 -2.2% 1.02x (?)
DataReset 2787 2783 -0.1% 1.00x (?)
DataSetCount 543 550 +1.3% 0.99x (?)
DataSubscript 220 220 +0.0% 1.00x
DictOfArraysToArrayOfDicts 789 779 -1.3% 1.01x (?)
Dictionary 501 496 -1.0% 1.01x (?)
Dictionary2 628 618 -1.6% 1.02x
Dictionary2OfObjects 2075 2081 +0.3% 1.00x (?)
Dictionary3 211 211 +0.0% 1.00x
Dictionary3OfObjects 713 711 -0.3% 1.00x (?)
Dictionary4 294 295 +0.3% 1.00x (?)
Dictionary4Legacy 650 652 +0.3% 1.00x (?)
Dictionary4OfObjects 413 418 +1.2% 0.99x (?)
Dictionary4OfObjectsLegacy 860 838 -2.6% 1.03x (?)
DictionaryBridge 1192 1158 -2.9% 1.03x (?)
DictionaryBridgeToObjC_Access 884 883 -0.1% 1.00x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 163 161 -1.2% 1.01x (?)
DictionaryCompactMapValuesOfCastValue 10923 10708 -2.0% 1.02x (?)
DictionaryCompactMapValuesOfNilValue 6420 6454 +0.5% 0.99x (?)
DictionaryCopy 98939 97633 -1.3% 1.01x (?)
DictionaryFilter 98605 98197 -0.4% 1.00x (?)
DictionaryGroup 200 200 +0.0% 1.00x
DictionaryGroupOfObjects 2079 2088 +0.4% 1.00x (?)
DictionaryKeysContainsCocoa 38 38 +0.0% 1.00x
DictionaryKeysContainsNative 30 30 +0.0% 1.00x
DictionaryLiteral 1825 1824 -0.1% 1.00x (?)
DictionaryOfObjects 2368 2369 +0.0% 1.00x (?)
DictionaryRemove 5301 5278 -0.4% 1.00x (?)
DictionaryRemoveOfObjects 24980 25050 +0.3% 1.00x (?)
DictionarySubscriptDefaultMutation 246 244 -0.8% 1.01x
DictionarySubscriptDefaultMutationArray 584 583 -0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 3984 4008 +0.6% 0.99x (?)
DictionarySubscriptDefaultMutationOfObjects 1681 1670 -0.7% 1.01x (?)
DictionarySwap 939 941 +0.2% 1.00x (?)
DictionarySwapAt 6325 6157 -2.7% 1.03x (?)
DictionarySwapAtOfObjects 51984 51995 +0.0% 1.00x (?)
DictionarySwapOfObjects 8644 8641 -0.0% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 76 76 +0.0% 1.00x
DropFirstAnyCollectionLazy 63937 64997 +1.7% 0.98x (?)
DropFirstAnySeqCRangeIter 93 93 +0.0% 1.00x
DropFirstAnySeqCRangeIterLazy 93 93 +0.0% 1.00x
DropFirstAnySeqCntRange 71 71 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 71 71 +0.0% 1.00x
DropFirstAnySequence 1841 1841 +0.0% 1.00x
DropFirstAnySequenceLazy 1841 1842 +0.1% 1.00x (?)
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 29 29 +0.0% 1.00x
DropFirstCountableRangeLazy 29 29 +0.0% 1.00x
DropFirstSequence 2681 2680 -0.0% 1.00x (?)
DropFirstSequenceLazy 2773 2771 -0.1% 1.00x (?)
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 21553 21661 +0.5% 1.00x (?)
DropLastAnySeqCRangeIter 3285 3291 +0.2% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3285 3291 +0.2% 1.00x (?)
DropLastAnySeqCntRange 9 9 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 9 9 +0.0% 1.00x
DropLastAnySequence 4942 4929 -0.3% 1.00x (?)
DropLastAnySequenceLazy 5017 5012 -0.1% 1.00x (?)
DropLastSequence 660 664 +0.6% 0.99x (?)
DropLastSequenceLazy 661 665 +0.6% 0.99x (?)
DropWhileAnyCollection 99 100 +1.0% 0.99x
DropWhileAnyCollectionLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCRangeIter 75 75 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 147 147 +0.0% 1.00x
DropWhileAnySequence 1854 1855 +0.1% 1.00x (?)
DropWhileAnySequenceLazy 1854 1854 +0.0% 1.00x
DropWhileArrayLazy 105 105 +0.0% 1.00x
DropWhileCountableRange 30 30 +0.0% 1.00x
DropWhileCountableRangeLazy 82 82 +0.0% 1.00x
DropWhileSequence 2208 2218 +0.5% 1.00x
DropWhileSequenceLazy 105 105 +0.0% 1.00x
EqualStringSubstring 49 49 +0.0% 1.00x
EqualSubstringString 49 48 -2.0% 1.02x (?)
EqualSubstringSubstring 50 48 -4.0% 1.04x
EqualSubstringSubstringGenericEquatable 50 48 -4.0% 1.04x
ErrorHandling 1206 1192 -1.2% 1.01x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1322 1319 -0.2% 1.00x (?)
FilterEvenUsingReduceInto 162 157 -3.1% 1.03x
FloatingPointPrinting_Double_description_small 21586 21597 +0.1% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 21161 21214 +0.3% 1.00x (?)
FloatingPointPrinting_Double_interpolated 62079 61759 -0.5% 1.01x (?)
FloatingPointPrinting_Float80_description_small 28556 28639 +0.3% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 27800 28117 +1.1% 0.99x (?)
FloatingPointPrinting_Float80_interpolated 64824 65331 +0.8% 0.99x (?)
FloatingPointPrinting_Float_description_small 5777 5702 -1.3% 1.01x
FloatingPointPrinting_Float_description_uniform 5743 5962 +3.8% 0.96x
FloatingPointPrinting_Float_interpolated 37924 38098 +0.5% 1.00x (?)
FrequenciesUsingReduce 4736 4700 -0.8% 1.01x (?)
FrequenciesUsingReduceInto 1488 1478 -0.7% 1.01x (?)
Hanoi 2114 2108 -0.3% 1.00x (?)
HashTest 937 934 -0.3% 1.00x (?)
Histogram 582 576 -1.0% 1.01x (?)
Integrate 334 334 +0.0% 1.00x
Join 162 160 -1.2% 1.01x
LazilyFilteredArrays2 4590 4574 -0.3% 1.00x (?)
LazilyFilteredRange 3655 3660 +0.1% 1.00x (?)
LessSubstringSubstring 48 48 +0.0% 1.00x
LessSubstringSubstringGenericComparable 48 48 +0.0% 1.00x
LinkedList 7574 7561 -0.2% 1.00x (?)
LuhnAlgoEager 443 443 +0.0% 1.00x
LuhnAlgoLazy 442 441 -0.2% 1.00x (?)
MapReduce 369 369 +0.0% 1.00x
MapReduceAnyCollection 370 370 +0.0% 1.00x
MapReduceAnyCollectionShort 1991 2015 +1.2% 0.99x (?)
MapReduceClass 2980 2988 +0.3% 1.00x (?)
MapReduceClassShort 4537 4537 +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 466 461 -1.1% 1.01x (?)
MapReduceShort 1999 2003 +0.2% 1.00x (?)
MapReduceShortString 20 20 +0.0% 1.00x
MapReduceString 47 47 +0.0% 1.00x
Memset 216 215 -0.5% 1.00x (?)
MonteCarloE 10275 10302 +0.3% 1.00x (?)
MonteCarloPi 42561 42917 +0.8% 0.99x
NSDictionaryCastToSwift 7066 7003 -0.9% 1.01x (?)
NSError 164 164 +0.0% 1.00x
NSStringConversion 688 692 +0.6% 0.99x (?)
NibbleSort 3291 3291 +0.0% 1.00x
NopDeinit 30154 30151 -0.0% 1.00x (?)
ObjectAllocation 132 132 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 24950 24463 -2.0% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 47113 45821 -2.7% 1.03x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 43331 43323 -0.0% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 102980 103422 +0.4% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 45055 44811 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSString 1219 1206 -1.1% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2492 2461 -1.2% 1.01x (?)
ObjectiveCBridgeStubDataAppend 6267 6163 -1.7% 1.02x (?)
ObjectiveCBridgeStubDateMutation 400 400 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 1014 1034 +2.0% 0.98x (?)
ObjectiveCBridgeStubNSDataAppend 2562 2541 -0.8% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString2 3944 3907 -0.9% 1.01x (?)
ObjectiveCBridgeStubToNSDate2 1553 1584 +2.0% 0.98x (?)
ObjectiveCBridgeStubToNSString 2341 2349 +0.3% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 121 124 +2.5% 0.98x (?)
ObjectiveCBridgeStubURLAppendPath2 2758 2787 +1.1% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef2 2629 2742 +4.3% 0.96x (?)
ObjectiveCBridgeToNSArray 14718 14643 -0.5% 1.01x (?)
ObjectiveCBridgeToNSDictionary 27063 26995 -0.3% 1.00x (?)
ObjectiveCBridgeToNSSet 16778 17050 +1.6% 0.98x (?)
ObjectiveCBridgeToNSString 455 458 +0.7% 0.99x (?)
ObserverClosure 2164 2154 -0.5% 1.00x (?)
ObserverForwarderStruct 1186 1189 +0.3% 1.00x (?)
ObserverPartiallyAppliedMethod 3732 3728 -0.1% 1.00x (?)
ObserverUnappliedMethod 2496 2487 -0.4% 1.00x (?)
OpaqueConsumingUsers 4179 4179 +0.0% 1.00x
Phonebook 7043 6766 -3.9% 1.04x
PointerArithmetics 31483 31487 +0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1791 1804 +0.7% 0.99x (?)
PopFrontArrayGeneric 1815 1817 +0.1% 1.00x (?)
PopFrontUnsafePointer 8748 8659 -1.0% 1.01x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnyCollectionLazy 64612 64942 +0.5% 0.99x (?)
PrefixAnySeqCRangeIter 33 33 +0.0% 1.00x
PrefixAnySeqCRangeIterLazy 33 33 +0.0% 1.00x
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 1378 1378 +0.0% 1.00x
PrefixAnySequenceLazy 1378 1378 +0.0% 1.00x
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 29 29 +0.0% 1.00x
PrefixCountableRangeLazy 29 29 +0.0% 1.00x
PrefixSequence 2222 2222 +0.0% 1.00x
PrefixSequenceLazy 2274 2275 +0.0% 1.00x (?)
PrefixWhileAnyCollection 146 146 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 89 89 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 367 384 +4.6% 0.96x
PrefixWhileAnySeqCRangeIterLazy 89 89 +0.0% 1.00x
PrefixWhileAnySequence 1525 1510 -1.0% 1.01x (?)
PrefixWhileAnySequenceLazy 1390 1391 +0.1% 1.00x (?)
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileSequence 326 343 +5.2% 0.95x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 899 903 +0.4% 1.00x (?)
PrimsSplit 899 902 +0.3% 1.00x (?)
QueueConcrete 1137 1137 +0.0% 1.00x
QueueGeneric 1129 1128 -0.1% 1.00x (?)
RC4 154 156 +1.3% 0.99x
RGBHistogram 2377 2409 +1.3% 0.99x (?)
RGBHistogramOfObjects 20100 20032 -0.3% 1.00x (?)
Radix2CooleyTukey 12142 12092 -0.4% 1.00x (?)
Radix2CooleyTukeyf 8755 8764 +0.1% 1.00x (?)
RandomDoubleLCG 2118 2175 +2.7% 0.97x
RandomIntegersDef 24694 24218 -1.9% 1.02x
RandomIntegersLCG 178 178 +0.0% 1.00x
RandomShuffleDef2 2589 2602 +0.5% 1.00x
RandomShuffleLCG2 1780 1816 +2.0% 0.98x
RangeAssignment 336 349 +3.9% 0.96x
RangeReplaceableCollectionPlusDefault 1059 1050 -0.8% 1.01x (?)
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 47 47 +0.0% 1.00x
RemoveWhereFilterString 240 238 -0.8% 1.01x (?)
RemoveWhereFilterStrings 436 435 -0.2% 1.00x (?)
RemoveWhereMoveStrings 708 706 -0.3% 1.00x (?)
RemoveWhereQuadraticInts 1284 1282 -0.2% 1.00x (?)
RemoveWhereQuadraticString 366 369 +0.8% 0.99x (?)
RemoveWhereQuadraticStrings 2754 2754 +0.0% 1.00x
RemoveWhereSwapInts 19 20 +5.3% 0.95x
RemoveWhereSwapStrings 861 858 -0.3% 1.00x (?)
ReversedArray2 200 200 +0.0% 1.00x
ReversedBidirectional 13883 13764 -0.9% 1.01x (?)
ReversedDictionary2 317 317 +0.0% 1.00x
RomanNumbers 76969 77177 +0.3% 1.00x (?)
SequenceAlgosAnySequence 12353 12273 -0.6% 1.01x (?)
SequenceAlgosArray 1576 1578 +0.1% 1.00x (?)
SequenceAlgosContiguousArray 1572 1569 -0.2% 1.00x (?)
SequenceAlgosList 1352 1355 +0.2% 1.00x (?)
SequenceAlgosRange 2576 2576 +0.0% 1.00x
SequenceAlgosUnfoldSequence 1105 1105 +0.0% 1.00x
SevenBoom 845 844 -0.1% 1.00x (?)
SortAdjacentIntPyramids 10230 10139 -0.9% 1.01x
SortIntPyramid 8749 8748 -0.0% 1.00x (?)
SortLargeExistentials 5439 5445 +0.1% 1.00x (?)
SortLettersInPlace 956 947 -0.9% 1.01x (?)
SortSortedStrings 675 672 -0.4% 1.00x (?)
SortStrings 1463 1453 -0.7% 1.01x (?)
SortStringsUnicode 2062 2061 -0.0% 1.00x (?)
StackPromo 24387 24425 +0.2% 1.00x (?)
StaticArray 9 9 +0.0% 1.00x
StrComplexWalk 1782 1779 -0.2% 1.00x (?)
StrToInt 3226 3206 -0.6% 1.01x (?)
StringAdder 551 548 -0.5% 1.01x
StringBuilder 490 490 +0.0% 1.00x
StringBuilderLong 1236 1217 -1.5% 1.02x (?)
StringBuilderSmallReservingCapacity 500 501 +0.2% 1.00x (?)
StringBuilderWithLongSubstring 1468 1473 +0.3% 1.00x (?)
StringComparison_abnormal 763 771 +1.0% 0.99x (?)
StringComparison_ascii 963 984 +2.2% 0.98x
StringComparison_emoji 853 865 +1.4% 0.99x (?)
StringComparison_fastPrenormal 874 866 -0.9% 1.01x
StringComparison_latin1 657 642 -2.3% 1.02x
StringComparison_longSharedPrefix 943 960 +1.8% 0.98x
StringComparison_nonBMPSlowestPrenormal 1669 1709 +2.4% 0.98x
StringComparison_slowerPrenormal 1809 1839 +1.7% 0.98x
StringComparison_zalgo 112692 111461 -1.1% 1.01x (?)
StringEdits 166681 159751 -4.2% 1.04x (?)
StringEnumRawValueInitialization 860 858 -0.2% 1.00x (?)
StringEqualPointerComparison 314 314 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2261 2204 -2.5% 1.03x
StringHasPrefixUnicode 98506 97732 -0.8% 1.01x (?)
StringHasSuffixAscii 2289 2290 +0.0% 1.00x (?)
StringHasSuffixUnicode 99251 99295 +0.0% 1.00x (?)
StringHashing_abnormal 1336 1321 -1.1% 1.01x (?)
StringHashing_emoji 1904 1860 -2.3% 1.02x (?)
StringHashing_fastPrenormal 8335 8357 +0.3% 1.00x (?)
StringHashing_latin1 2544 2553 +0.4% 1.00x (?)
StringHashing_longSharedPrefix 7652 7681 +0.4% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2081 2040 -2.0% 1.02x (?)
StringHashing_slowerPrenormal 2711 2713 +0.1% 1.00x (?)
StringHashing_zalgo 3471 3455 -0.5% 1.00x (?)
StringInterpolation 8830 8905 +0.8% 0.99x (?)
StringInterpolationManySmallSegments 17496 17405 -0.5% 1.01x (?)
StringInterpolationSmall 3998 3932 -1.7% 1.02x
StringMatch 11989 11779 -1.8% 1.02x (?)
StringRemoveDupes 467 460 -1.5% 1.02x (?)
StringUTF16Builder 2533 2535 +0.1% 1.00x (?)
StringUTF16SubstringBuilder 5633 5719 +1.5% 0.98x (?)
StringWalk 1547 1557 +0.6% 0.99x
StringWithCString2 1691 1692 +0.1% 1.00x (?)
StringWordBuilder 2273 2276 +0.1% 1.00x (?)
StringWordBuilderReservingCapacity 1663 1629 -2.0% 1.02x
SubstringComparable 12 12 +0.0% 1.00x
SubstringEqualString 606 615 +1.5% 0.99x (?)
SubstringEquatable 1414 1450 +2.5% 0.98x
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 74 73 -1.4% 1.01x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 21374 21688 +1.5% 0.99x (?)
SuffixAnySeqCRangeIter 3590 3600 +0.3% 1.00x (?)
SuffixAnySeqCRangeIterLazy 3592 3584 -0.2% 1.00x (?)
SuffixAnySeqCntRange 14 14 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 14 14 +0.0% 1.00x
SuffixAnySequence 4932 4947 +0.3% 1.00x (?)
SuffixAnySequenceLazy 5054 5073 +0.4% 1.00x (?)
SuffixSequence 3606 3643 +1.0% 0.99x (?)
SuffixSequenceLazy 3588 3627 +1.1% 0.99x (?)
SumUsingReduce 101 97 -4.0% 1.04x
SumUsingReduceInto 101 97 -4.0% 1.04x
SuperChars 19371 19413 +0.2% 1.00x (?)
TwoSum 1376 1341 -2.5% 1.03x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 302 303 +0.3% 1.00x
UTF8Decode_InitDecoding 1348 1349 +0.1% 1.00x (?)
UTF8Decode_InitDecoding_ascii 656 654 -0.3% 1.00x (?)
UTF8Decode_InitFromBytes 1199 1169 -2.5% 1.03x (?)
UTF8Decode_InitFromBytes_ascii 485 477 -1.6% 1.02x (?)
UTF8Decode_InitFromData 1243 1227 -1.3% 1.01x (?)
UTF8Decode_InitFromData_ascii 694 665 -4.2% 1.04x (?)
Walsh 402 414 +3.0% 0.97x
WordCountHistogramASCII 6888 6727 -2.3% 1.02x (?)
WordCountHistogramUTF16 10055 10245 +1.9% 0.98x (?)
WordCountUniqueASCII 2081 1995 -4.1% 1.04x
WordCountUniqueUTF16 4494 4430 -1.4% 1.01x (?)
XorLoop 389 391 +0.5% 0.99x (?)

Unoptimized (Onone)

Regression (21)
TEST OLD NEW DELTA SPEEDUP
PrefixArrayLazy 30206 34476 +14.1% 0.88x
DropFirstArrayLazy 30240 34421 +13.8% 0.88x
WordCountUniqueASCII 6847 7762 +13.4% 0.88x
WordCountUniqueUTF16 9697 10947 +12.9% 0.89x
DropFirstCountableRangeLazy 35979 40589 +12.8% 0.89x
PrefixCountableRangeLazy 35950 40449 +12.5% 0.89x
PopFrontArrayGeneric 5616 6316 +12.5% 0.89x
StringInterpolationSmall 5954 6665 +11.9% 0.89x
RomanNumbers 1360328 1477834 +8.6% 0.92x
RangeAssignment 2713 2936 +8.2% 0.92x
RandomDoubleLCG 55211 59474 +7.7% 0.93x (?)
ArrayAppendAsciiSubstring 70335 75608 +7.5% 0.93x (?)
FloatingPointPrinting_Double_interpolated 95104 102228 +7.5% 0.93x (?)
StringBuilderLong 1439 1546 +7.4% 0.93x (?)
ExclusivityIndependent 70 75 +7.1% 0.93x (?)
RGBHistogramOfObjects 72008 76482 +6.2% 0.94x (?)
StringUTF16SubstringBuilder 20798 22045 +6.0% 0.94x (?)
DropFirstAnyCollectionLazy 104305 110404 +5.8% 0.94x (?)
ObjectiveCBridgeStubURLAppendPath2 2819 2978 +5.6% 0.95x (?)
FloatingPointPrinting_Float_description_small 6851 7213 +5.3% 0.95x
PrefixAnyCollectionLazy 104416 109929 +5.3% 0.95x (?)
Improvement (23)
TEST OLD NEW DELTA SPEEDUP
SetIsSubsetOf_OfObjects 1904 976 -48.7% 1.95x
SetExclusiveOr_OfObjects 39016 22462 -42.4% 1.74x
SetUnion_OfObjects 28907 18232 -36.9% 1.59x
SetIntersect_OfObjects 7591 5541 -27.0% 1.37x
SetIsSubsetOf 852 692 -18.8% 1.23x
StringMatch 49340 40332 -18.3% 1.22x
SetIntersect 3782 3126 -17.3% 1.21x
SetExclusiveOr 12815 11312 -11.7% 1.13x
FrequenciesUsingReduceInto 3564 3146 -11.7% 1.13x
SetUnion 10575 9387 -11.2% 1.13x
COWArrayGuaranteedParameterOverhead 17903 15956 -10.9% 1.12x
ArrayOfPOD 849 761 -10.4% 1.12x
ArrayOfGenericPOD2 1184 1069 -9.7% 1.11x
UTF8Decode_InitFromData_ascii 752 683 -9.2% 1.10x (?)
CharIteration_punctuated_unicodeScalars_Backwards 58696 54017 -8.0% 1.09x
Dictionary4OfObjectsLegacy 2125 1975 -7.1% 1.08x
DataReplaceMediumBuffer 14192 13240 -6.7% 1.07x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 50463 47428 -6.0% 1.06x (?)
DictionaryGroupOfObjects 7200 6824 -5.2% 1.06x
DataAppendDataMediumToMedium 6879 6520 -5.2% 1.06x (?)
UTF8Decode_InitDecoding_ascii 949 900 -5.2% 1.05x (?)
ObjectiveCBridgeStubToNSDate2 1691 1606 -5.0% 1.05x (?)
StringWordBuilderReservingCapacity 1909 1814 -5.0% 1.05x
No Changes (403)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 5010 5038 +0.6% 0.99x (?)
AnyHashableWithAClass 106280 105431 -0.8% 1.01x
Array2D 587099 588624 +0.3% 1.00x
ArrayAppend 4549 4434 -2.5% 1.03x
ArrayAppendArrayOfInt 863 871 +0.9% 0.99x (?)
ArrayAppendAscii 26612 26876 +1.0% 0.99x (?)
ArrayAppendFromGeneric 866 878 +1.4% 0.99x (?)
ArrayAppendGenericStructs 1499 1517 +1.2% 0.99x (?)
ArrayAppendLatin1 62648 62902 +0.4% 1.00x (?)
ArrayAppendLatin1Substring 159158 163786 +2.9% 0.97x
ArrayAppendLazyMap 164959 163999 -0.6% 1.01x (?)
ArrayAppendOptionals 1525 1526 +0.1% 1.00x (?)
ArrayAppendRepeatCol 187986 194043 +3.2% 0.97x
ArrayAppendReserved 4274 4159 -2.7% 1.03x
ArrayAppendSequence 101576 100796 -0.8% 1.01x (?)
ArrayAppendStrings 6444 6345 -1.5% 1.02x
ArrayAppendToFromGeneric 876 876 +0.0% 1.00x
ArrayAppendToGeneric 880 884 +0.5% 1.00x (?)
ArrayAppendUTF16 63409 63355 -0.1% 1.00x (?)
ArrayAppendUTF16Substring 158115 163498 +3.4% 0.97x (?)
ArrayInClass 6289 6251 -0.6% 1.01x (?)
ArrayLiteral 1790 1792 +0.1% 1.00x (?)
ArrayOfGenericRef 10207 10218 +0.1% 1.00x (?)
ArrayOfRef 9412 9437 +0.3% 1.00x (?)
ArrayPlusEqualArrayOfInt 875 876 +0.1% 1.00x (?)
ArrayPlusEqualFiveElementCollection 232263 232954 +0.3% 1.00x (?)
ArrayPlusEqualSingleElementCollection 232914 233965 +0.5% 1.00x (?)
ArrayPlusEqualThreeElements 9749 9672 -0.8% 1.01x (?)
ArraySubscript 108646 110001 +1.2% 0.99x (?)
ArrayValueProp 3610 3666 +1.6% 0.98x
ArrayValueProp2 14927 14990 +0.4% 1.00x (?)
ArrayValueProp3 4144 4123 -0.5% 1.01x (?)
ArrayValueProp4 4107 4104 -0.1% 1.00x (?)
BinaryFloatingPointPropertiesBinade 83 83 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 140 134 -4.3% 1.04x
BinaryFloatingPointPropertiesUlp 137 131 -4.4% 1.05x
BitCount 8835 8836 +0.0% 1.00x (?)
ByteSwap 9854 9786 -0.7% 1.01x
COWTree 12373 11881 -4.0% 1.04x (?)
CSVParsing2 6997 7039 +0.6% 0.99x (?)
CSVParsingAlt2 3213 3243 +0.9% 0.99x (?)
CSVParsingAltIndices2 6203 5930 -4.4% 1.05x (?)
CStringLongAscii 3377 3406 +0.9% 0.99x
CStringLongNonAscii 2207 2254 +2.1% 0.98x (?)
CStringShortAscii 6060 5926 -2.2% 1.02x (?)
Calculator 1079 1036 -4.0% 1.04x
CaptureProp 288123 284478 -1.3% 1.01x
ChainedFilterMap 228512 229120 +0.3% 1.00x
CharIndexing_ascii_unicodeScalars 318477 321300 +0.9% 0.99x (?)
CharIndexing_ascii_unicodeScalars_Backwards 356763 360947 +1.2% 0.99x (?)
CharIndexing_chinese_unicodeScalars 240289 241820 +0.6% 0.99x (?)
CharIndexing_chinese_unicodeScalars_Backwards 270021 269774 -0.1% 1.00x (?)
CharIndexing_japanese_unicodeScalars 384523 382937 -0.4% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 427199 430494 +0.8% 0.99x (?)
CharIndexing_korean_unicodeScalars 308950 311573 +0.8% 0.99x (?)
CharIndexing_korean_unicodeScalars_Backwards 345395 345884 +0.1% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 56946 57086 +0.2% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 62037 62039 +0.0% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 72036 71757 -0.4% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 78684 78417 -0.3% 1.00x (?)
CharIndexing_russian_unicodeScalars 265312 266081 +0.3% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 299814 297191 -0.9% 1.01x (?)
CharIndexing_tweet_unicodeScalars 651906 633426 -2.8% 1.03x
CharIndexing_tweet_unicodeScalars_Backwards 709592 713983 +0.6% 0.99x (?)
CharIndexing_utf16_unicodeScalars 282714 281996 -0.3% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 303963 308668 +1.5% 0.98x (?)
CharIteration_ascii_unicodeScalars 145646 147496 +1.3% 0.99x (?)
CharIteration_ascii_unicodeScalars_Backwards 249398 245446 -1.6% 1.02x
CharIteration_chinese_unicodeScalars 110093 111631 +1.4% 0.99x
CharIteration_chinese_unicodeScalars_Backwards 186163 185482 -0.4% 1.00x (?)
CharIteration_japanese_unicodeScalars 174842 177190 +1.3% 0.99x (?)
CharIteration_japanese_unicodeScalars_Backwards 294815 294390 -0.1% 1.00x (?)
CharIteration_korean_unicodeScalars 141751 143326 +1.1% 0.99x (?)
CharIteration_korean_unicodeScalars_Backwards 239175 238248 -0.4% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 26054 26386 +1.3% 0.99x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 43396 42872 -1.2% 1.01x (?)
CharIteration_punctuated_unicodeScalars 33694 33167 -1.6% 1.02x
CharIteration_russian_unicodeScalars 121726 123227 +1.2% 0.99x (?)
CharIteration_russian_unicodeScalars_Backwards 204785 203746 -0.5% 1.01x (?)
CharIteration_tweet_unicodeScalars 288006 292236 +1.5% 0.99x (?)
CharIteration_tweet_unicodeScalars_Backwards 489877 485527 -0.9% 1.01x (?)
CharIteration_utf16_unicodeScalars 124656 126901 +1.8% 0.98x
CharIteration_utf16_unicodeScalars_Backwards 216985 215321 -0.8% 1.01x (?)
CharacterLiteralsLarge 5770 5766 -0.1% 1.00x (?)
CharacterLiteralsSmall 681 680 -0.1% 1.00x
CharacterPropertiesFetch 5443 5439 -0.1% 1.00x (?)
CharacterPropertiesPrecomputed 2905 2776 -4.4% 1.05x (?)
CharacterPropertiesStashed 2636 2556 -3.0% 1.03x (?)
CharacterPropertiesStashedMemo 4083 3890 -4.7% 1.05x (?)
Chars2 35291 35443 +0.4% 1.00x (?)
ClassArrayGetter2 9514 9526 +0.1% 1.00x
Combos 2450 2385 -2.7% 1.03x (?)
DataAccessBytes 2381 2382 +0.0% 1.00x (?)
DataAppendArray 5456 5419 -0.7% 1.01x (?)
DataAppendBytes 5170 5418 +4.8% 0.95x (?)
DataAppendDataLargeToLarge 68649 66503 -3.1% 1.03x (?)
DataAppendDataLargeToMedium 35323 35452 +0.4% 1.00x (?)
DataAppendDataLargeToSmall 34563 34769 +0.6% 0.99x (?)
DataAppendDataMediumToLarge 38016 37417 -1.6% 1.02x (?)
DataAppendDataMediumToSmall 5909 5963 +0.9% 0.99x (?)
DataAppendDataSmallToLarge 36525 37422 +2.5% 0.98x (?)
DataAppendDataSmallToMedium 6156 6155 -0.0% 1.00x (?)
DataAppendDataSmallToSmall 5978 5772 -3.4% 1.04x (?)
DataAppendSequence 1976376 2032864 +2.9% 0.97x
DataCopyBytes 543 544 +0.2% 1.00x
DataCount 223 223 +0.0% 1.00x
DataMutateBytes 5163 5308 +2.8% 0.97x (?)
DataReplaceLarge 37116 36574 -1.5% 1.01x (?)
DataReplaceLargeBuffer 59201 59049 -0.3% 1.00x (?)
DataReplaceMedium 8269 8154 -1.4% 1.01x (?)
DataReplaceSmall 5811 5699 -1.9% 1.02x (?)
DataReplaceSmallBuffer 9880 9499 -3.9% 1.04x (?)
DataReset 2836 2895 +2.1% 0.98x (?)
DataSetCount 558 564 +1.1% 0.99x (?)
DataSubscript 444 444 +0.0% 1.00x
DictOfArraysToArrayOfDicts 3782 3669 -3.0% 1.03x
Dictionary 2127 2106 -1.0% 1.01x (?)
Dictionary2 1285 1278 -0.5% 1.01x
Dictionary2OfObjects 4234 4212 -0.5% 1.01x (?)
Dictionary3 801 809 +1.0% 0.99x (?)
Dictionary3OfObjects 1943 1994 +2.6% 0.97x (?)
Dictionary4 1168 1156 -1.0% 1.01x
Dictionary4Legacy 1424 1418 -0.4% 1.00x (?)
Dictionary4OfObjects 1771 1722 -2.8% 1.03x (?)
DictionaryBridge 1314 1292 -1.7% 1.02x (?)
DictionaryBridgeToObjC_Access 1453 1511 +4.0% 0.96x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 165 165 +0.0% 1.00x
DictionaryCompactMapValuesOfCastValue 118306 122369 +3.4% 0.97x (?)
DictionaryCompactMapValuesOfNilValue 32342 32818 +1.5% 0.99x
DictionaryCopy 300051 298809 -0.4% 1.00x (?)
DictionaryFilter 299173 299257 +0.0% 1.00x (?)
DictionaryGroup 4424 4439 +0.3% 1.00x (?)
DictionaryKeysContainsCocoa 65 63 -3.1% 1.03x (?)
DictionaryKeysContainsNative 51 50 -2.0% 1.02x (?)
DictionaryLiteral 8421 8339 -1.0% 1.01x (?)
DictionaryOfObjects 5986 5853 -2.2% 1.02x (?)
DictionaryRemove 17290 17403 +0.7% 0.99x (?)
DictionaryRemoveOfObjects 53517 53926 +0.8% 0.99x (?)
DictionarySubscriptDefaultMutation 1909 1906 -0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2158 2177 +0.9% 0.99x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9389 9717 +3.5% 0.97x (?)
DictionarySubscriptDefaultMutationOfObjects 5195 5418 +4.3% 0.96x (?)
DictionarySwap 4615 4658 +0.9% 0.99x (?)
DictionarySwapAt 32073 32434 +1.1% 0.99x (?)
DictionarySwapAtOfObjects 113545 114996 +1.3% 0.99x (?)
DictionarySwapOfObjects 18895 19238 +1.8% 0.98x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 15958 16531 +3.6% 0.97x
DropFirstAnySeqCRangeIter 25479 25719 +0.9% 0.99x
DropFirstAnySeqCRangeIterLazy 25274 25741 +1.8% 0.98x
DropFirstAnySeqCntRange 16075 16565 +3.0% 0.97x
DropFirstAnySeqCntRangeLazy 15876 16440 +3.6% 0.97x
DropFirstAnySequence 12392 12284 -0.9% 1.01x
DropFirstAnySequenceLazy 12262 12236 -0.2% 1.00x (?)
DropFirstArray 3451 3585 +3.9% 0.96x
DropFirstCountableRange 345 350 +1.4% 0.99x
DropFirstSequence 11979 11836 -1.2% 1.01x
DropFirstSequenceLazy 11967 11792 -1.5% 1.01x
DropLastAnyCollection 5335 5529 +3.6% 0.96x
DropLastAnyCollectionLazy 34851 36597 +5.0% 0.95x (?)
DropLastAnySeqCRangeIter 39863 40436 +1.4% 0.99x (?)
DropLastAnySeqCRangeIterLazy 40025 40480 +1.1% 0.99x
DropLastAnySeqCntRange 5368 5514 +2.7% 0.97x
DropLastAnySeqCntRangeLazy 5323 5547 +4.2% 0.96x
DropLastAnySequence 29045 28796 -0.9% 1.01x
DropLastAnySequenceLazy 28924 28762 -0.6% 1.01x
DropLastSequence 28770 28719 -0.2% 1.00x (?)
DropLastSequenceLazy 28746 28661 -0.3% 1.00x
DropWhileAnyCollection 20602 21110 +2.5% 0.98x
DropWhileAnyCollectionLazy 23828 24310 +2.0% 0.98x
DropWhileAnySeqCRangeIter 26187 26474 +1.1% 0.99x
DropWhileAnySeqCRangeIterLazy 23844 24429 +2.5% 0.98x (?)
DropWhileAnySeqCntRange 20680 21285 +2.9% 0.97x (?)
DropWhileAnySeqCntRangeLazy 23815 24235 +1.8% 0.98x (?)
DropWhileAnySequence 13149 13171 +0.2% 1.00x (?)
DropWhileAnySequenceLazy 11954 12023 +0.6% 0.99x (?)
DropWhileArrayLazy 13432 13419 -0.1% 1.00x (?)
DropWhileCountableRange 5027 5142 +2.3% 0.98x
DropWhileCountableRangeLazy 22788 22941 +0.7% 0.99x (?)
DropWhileSequence 12784 12766 -0.1% 1.00x (?)
DropWhileSequenceLazy 11436 11439 +0.0% 1.00x (?)
EqualStringSubstring 72 72 +0.0% 1.00x
EqualSubstringString 72 72 +0.0% 1.00x
EqualSubstringSubstring 72 73 +1.4% 0.99x (?)
EqualSubstringSubstringGenericEquatable 58 58 +0.0% 1.00x
ErrorHandling 5210 5319 +2.1% 0.98x (?)
ExclusivityGlobal 186 194 +4.3% 0.96x (?)
FatCompactMap 286689 284768 -0.7% 1.01x (?)
FilterEvenUsingReduce 3620 3556 -1.8% 1.02x (?)
FilterEvenUsingReduceInto 1847 1831 -0.9% 1.01x (?)
FloatingPointPrinting_Double_description_small 22405 22334 -0.3% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 34625 34359 -0.8% 1.01x (?)
FloatingPointPrinting_Float80_description_small 29760 29689 -0.2% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 56813 56473 -0.6% 1.01x (?)
FloatingPointPrinting_Float80_interpolated 120051 120932 +0.7% 0.99x (?)
FloatingPointPrinting_Float_description_uniform 17677 17658 -0.1% 1.00x (?)
FloatingPointPrinting_Float_interpolated 69402 68314 -1.6% 1.02x (?)
FrequenciesUsingReduce 10537 10479 -0.6% 1.01x (?)
Hanoi 19495 19552 +0.3% 1.00x (?)
HashTest 20621 20342 -1.4% 1.01x (?)
Histogram 6031 6046 +0.2% 1.00x (?)
Integrate 588 587 -0.2% 1.00x (?)
IterateData 4961 4988 +0.5% 0.99x
Join 176 175 -0.6% 1.01x
LazilyFilteredArrayContains 751590 732260 -2.6% 1.03x
LazilyFilteredArrays2 90158 90595 +0.5% 1.00x (?)
LazilyFilteredRange 552868 565581 +2.3% 0.98x
LessSubstringSubstring 72 73 +1.4% 0.99x
LessSubstringSubstringGenericComparable 57 57 +0.0% 1.00x
LinkedList 32632 32442 -0.6% 1.01x
LuhnAlgoEager 5613 5835 +4.0% 0.96x (?)
LuhnAlgoLazy 5772 5866 +1.6% 0.98x (?)
MapReduce 25203 26141 +3.7% 0.96x (?)
MapReduceAnyCollection 25228 24948 -1.1% 1.01x (?)
MapReduceAnyCollectionShort 36775 36644 -0.4% 1.00x (?)
MapReduceClass 28938 28738 -0.7% 1.01x (?)
MapReduceClassShort 40039 39736 -0.8% 1.01x (?)
MapReduceLazyCollection 22278 21992 -1.3% 1.01x (?)
MapReduceLazyCollectionShort 32548 33014 +1.4% 0.99x (?)
MapReduceLazySequence 19696 19510 -0.9% 1.01x (?)
MapReduceSequence 29702 29887 +0.6% 0.99x (?)
MapReduceShort 36087 36091 +0.0% 1.00x (?)
MapReduceShortString 227 223 -1.8% 1.02x (?)
MapReduceString 1701 1704 +0.2% 1.00x (?)
Memset 48065 47198 -1.8% 1.02x
MonteCarloE 1150458 1167573 +1.5% 0.99x
MonteCarloPi 5248557 5324084 +1.4% 0.99x
NSDictionaryCastToSwift 8303 8141 -2.0% 1.02x (?)
NSError 601 602 +0.2% 1.00x (?)
NSStringConversion 731 739 +1.1% 0.99x (?)
NibbleSort 374461 380887 +1.7% 0.98x
NopDeinit 192232 200782 +4.4% 0.96x
ObjectAllocation 1246 1254 +0.6% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObject 29878 29255 -2.1% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 8879 9241 +4.1% 0.96x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 47976 46247 -3.6% 1.04x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 110444 110977 +0.5% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 50368 48102 -4.5% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4409 4436 +0.6% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 72542 74305 +2.4% 0.98x (?)
ObjectiveCBridgeFromNSString 2901 2910 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2620 2590 -1.1% 1.01x (?)
ObjectiveCBridgeStubDataAppend 6748 6513 -3.5% 1.04x (?)
ObjectiveCBridgeStubDateMutation 801 773 -3.5% 1.04x
ObjectiveCBridgeStubFromArrayOfNSString2 3532 3411 -3.4% 1.04x (?)
ObjectiveCBridgeStubFromNSString 1080 1060 -1.9% 1.02x (?)
ObjectiveCBridgeStubNSDataAppend 2969 3022 +1.8% 0.98x (?)
ObjectiveCBridgeStubToArrayOfNSString2 3955 3945 -0.3% 1.00x (?)
ObjectiveCBridgeStubToNSString 2425 2420 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 153 150 -2.0% 1.02x
ObjectiveCBridgeStubURLAppendPathRef2 2938 2918 -0.7% 1.01x (?)
ObjectiveCBridgeToNSArray 15041 15384 +2.3% 0.98x (?)
ObjectiveCBridgeToNSDictionary 29510 30242 +2.5% 0.98x (?)
ObjectiveCBridgeToNSSet 18057 18842 +4.3% 0.96x (?)
ObjectiveCBridgeToNSString 550 544 -1.1% 1.01x (?)
ObserverClosure 6529 6571 +0.6% 0.99x
ObserverForwarderStruct 4451 4460 +0.2% 1.00x (?)
ObserverPartiallyAppliedMethod 7917 7981 +0.8% 0.99x (?)
ObserverUnappliedMethod 7783 7795 +0.2% 1.00x (?)
OpaqueConsumingUsers 13406 13408 +0.0% 1.00x (?)
OpenClose 590 597 +1.2% 0.99x
Phonebook 16173 15925 -1.5% 1.02x
PointerArithmetics 402732 412548 +2.4% 0.98x
PolymorphicCalls 2410 2394 -0.7% 1.01x
PopFrontArray 4502 4372 -2.9% 1.03x (?)
PopFrontUnsafePointer 11918 11922 +0.0% 1.00x (?)
PrefixAnyCollection 15968 16507 +3.4% 0.97x
PrefixAnySeqCRangeIter 20195 20414 +1.1% 0.99x
PrefixAnySeqCRangeIterLazy 20184 20414 +1.1% 0.99x
PrefixAnySeqCntRange 16005 16649 +4.0% 0.96x
PrefixAnySeqCntRangeLazy 15892 16433 +3.4% 0.97x (?)
PrefixAnySequence 10059 9834 -2.2% 1.02x
PrefixAnySequenceLazy 10072 9908 -1.6% 1.02x
PrefixArray 3478 3535 +1.6% 0.98x
PrefixCountableRange 345 349 +1.2% 0.99x
PrefixSequence 9932 9719 -2.1% 1.02x (?)
PrefixSequenceLazy 9639 9579 -0.6% 1.01x
PrefixWhileAnyCollection 29938 30552 +2.1% 0.98x
PrefixWhileAnyCollectionLazy 19615 20072 +2.3% 0.98x
PrefixWhileAnySeqCRangeIter 33744 34066 +1.0% 0.99x
PrefixWhileAnySeqCRangeIterLazy 19589 19937 +1.8% 0.98x (?)
PrefixWhileAnySequence 25680 25520 -0.6% 1.01x
PrefixWhileAnySequenceLazy 10651 10627 -0.2% 1.00x (?)
PrefixWhileArray 10308 10401 +0.9% 0.99x
PrefixWhileArrayLazy 12320 12216 -0.8% 1.01x
PrefixWhileSequence 25094 25001 -0.4% 1.00x (?)
PrefixWhileSequenceLazy 10446 10305 -1.3% 1.01x
Prims 9270 9214 -0.6% 1.01x (?)
PrimsSplit 9304 9160 -1.5% 1.02x (?)
QueueConcrete 13988 13901 -0.6% 1.01x (?)
QueueGeneric 18782 18797 +0.1% 1.00x (?)
RC4 15911 15961 +0.3% 1.00x
RGBHistogram 22356 22416 +0.3% 1.00x (?)
Radix2CooleyTukey 47009 47290 +0.6% 0.99x (?)
Radix2CooleyTukeyf 40884 41018 +0.3% 1.00x (?)
RandomDoubleDef 82724 85957 +3.9% 0.96x (?)
RandomIntegersDef 44060 44138 +0.2% 1.00x (?)
RandomIntegersLCG 32630 32985 +1.1% 0.99x
RandomShuffleDef2 7139 7181 +0.6% 0.99x (?)
RandomShuffleLCG2 47090 48118 +2.2% 0.98x
RangeIterationSigned 14568 14624 +0.4% 1.00x (?)
RangeReplaceableCollectionPlusDefault 11921 11518 -3.4% 1.03x (?)
RecursiveOwnedParameter 6048 6053 +0.1% 1.00x (?)
RemoveWhereFilterInts 2000 1999 -0.0% 1.00x (?)
RemoveWhereFilterString 1295 1285 -0.8% 1.01x (?)
RemoveWhereFilterStrings 2525 2517 -0.3% 1.00x
RemoveWhereMoveInts 3331 3329 -0.1% 1.00x (?)
RemoveWhereMoveStrings 3865 3865 +0.0% 1.00x
RemoveWhereQuadraticInts 8527 8506 -0.2% 1.00x
RemoveWhereQuadraticString 2577 2567 -0.4% 1.00x (?)
RemoveWhereQuadraticStrings 10170 10145 -0.2% 1.00x
RemoveWhereSwapInts 5955 5990 +0.6% 0.99x
RemoveWhereSwapStrings 6653 6673 +0.3% 1.00x
ReversedArray2 14173 14063 -0.8% 1.01x
ReversedBidirectional 43558 44355 +1.8% 0.98x
ReversedDictionary2 15376 15402 +0.2% 1.00x (?)
SequenceAlgosAnySequence 13569 13730 +1.2% 0.99x (?)
SequenceAlgosArray 735556 729890 -0.8% 1.01x
SequenceAlgosContiguousArray 310160 304330 -1.9% 1.02x
SequenceAlgosList 8554 8631 +0.9% 0.99x
SequenceAlgosRange 1326498 1343161 +1.3% 0.99x
SequenceAlgosUnfoldSequence 6284 6277 -0.1% 1.00x (?)
SevenBoom 1045 1048 +0.3% 1.00x (?)
Sim2DArray 45274 45397 +0.3% 1.00x (?)
SortAdjacentIntPyramids 209835 201852 -3.8% 1.04x
SortIntPyramid 244622 236934 -3.1% 1.03x
SortLargeExistentials 9816 9693 -1.3% 1.01x
SortLettersInPlace 1604 1601 -0.2% 1.00x (?)
SortSortedStrings 858 871 +1.5% 0.99x
SortStrings 1802 1806 +0.2% 1.00x (?)
SortStringsUnicode 2746 2710 -1.3% 1.01x
StackPromo 93094 93196 +0.1% 1.00x (?)
StaticArray 2321 2316 -0.2% 1.00x (?)
StrComplexWalk 7265 7264 -0.0% 1.00x (?)
StrToInt 77709 78963 +1.6% 0.98x (?)
StringAdder 776 748 -3.6% 1.04x
StringBuilder 5029 5094 +1.3% 0.99x (?)
StringBuilderSmallReservingCapacity 5049 5140 +1.8% 0.98x (?)
StringBuilderWithLongSubstring 3397 3508 +3.3% 0.97x (?)
StringComparison_abnormal 1324 1295 -2.2% 1.02x (?)
StringComparison_ascii 8833 8828 -0.1% 1.00x (?)
StringComparison_emoji 1982 1985 +0.2% 1.00x (?)
StringComparison_fastPrenormal 4832 4854 +0.5% 1.00x (?)
StringComparison_latin1 3768 3775 +0.2% 1.00x (?)
StringComparison_longSharedPrefix 2340 2347 +0.3% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 3682 3677 -0.1% 1.00x (?)
StringComparison_slowerPrenormal 4153 4156 +0.1% 1.00x (?)
StringComparison_zalgo 114189 114094 -0.1% 1.00x (?)
StringEdits 371248 361262 -2.7% 1.03x (?)
StringEnumRawValueInitialization 23071 22934 -0.6% 1.01x (?)
StringEqualPointerComparison 1692 1695 +0.2% 1.00x (?)
StringFromLongWholeSubstring 22 23 +4.5% 0.96x
StringFromLongWholeSubstringGeneric 195 195 +0.0% 1.00x
StringHasPrefixAscii 3135 3133 -0.1% 1.00x (?)
StringHasPrefixUnicode 100713 98663 -2.0% 1.02x
StringHasSuffixAscii 3179 3233 +1.7% 0.98x
StringHasSuffixUnicode 100594 100498 -0.1% 1.00x (?)
StringHashing_abnormal 1447 1448 +0.1% 1.00x (?)
StringHashing_ascii 209 213 +1.9% 0.98x
StringHashing_emoji 2136 2093 -2.0% 1.02x (?)
StringHashing_fastPrenormal 8667 8594 -0.8% 1.01x (?)
StringHashing_latin1 2788 2774 -0.5% 1.01x (?)
StringHashing_longSharedPrefix 7818 7849 +0.4% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2408 2357 -2.1% 1.02x (?)
StringHashing_slowerPrenormal 2936 2909 -0.9% 1.01x (?)
StringHashing_zalgo 3630 3594 -1.0% 1.01x (?)
StringInterpolation 11695 12165 +4.0% 0.96x (?)
StringInterpolationManySmallSegments 18582 18285 -1.6% 1.02x (?)
StringRemoveDupes 703 716 +1.8% 0.98x
StringUTF16Builder 7616 7717 +1.3% 0.99x (?)
StringWalk 13003 13458 +3.5% 0.97x
StringWithCString2 1693 1693 +0.0% 1.00x
StringWordBuilder 2541 2511 -1.2% 1.01x
SubstringComparable 1580 1580 +0.0% 1.00x
SubstringEqualString 1697 1716 +1.1% 0.99x (?)
SubstringEquatable 5304 5252 -1.0% 1.01x
SubstringFromLongString 15 15 +0.0% 1.00x
SubstringFromLongStringGeneric 104 104 +0.0% 1.00x
SuffixAnyCollection 5318 5508 +3.6% 0.97x (?)
SuffixAnyCollectionLazy 35949 36579 +1.8% 0.98x (?)
SuffixAnySeqCRangeIter 36097 36602 +1.4% 0.99x
SuffixAnySeqCRangeIterLazy 36235 36638 +1.1% 0.99x
SuffixAnySeqCntRange 5329 5511 +3.4% 0.97x (?)
SuffixAnySeqCntRangeLazy 5301 5499 +3.7% 0.96x
SuffixAnySequence 25194 25207 +0.1% 1.00x (?)
SuffixAnySequenceLazy 25184 25202 +0.1% 1.00x (?)
SuffixSequence 25170 24990 -0.7% 1.01x
SuffixSequenceLazy 25045 25006 -0.2% 1.00x (?)
SumUsingReduce 155948 156236 +0.2% 1.00x (?)
SumUsingReduceInto 149015 148504 -0.3% 1.00x (?)
SuperChars 79560 77741 -2.3% 1.02x (?)
TwoSum 3701 3683 -0.5% 1.00x (?)
TypeFlood 199 197 -1.0% 1.01x (?)
UTF8Decode 28813 28910 +0.3% 1.00x
UTF8Decode_InitDecoding 1406 1425 +1.4% 0.99x
UTF8Decode_InitFromBytes 1181 1190 +0.8% 0.99x (?)
UTF8Decode_InitFromBytes_ascii 501 487 -2.8% 1.03x (?)
UTF8Decode_InitFromData 1253 1253 +0.0% 1.00x
Walsh 11993 12020 +0.2% 1.00x (?)
WordCountHistogramASCII 37092 36862 -0.6% 1.01x (?)
WordCountHistogramUTF16 43004 42584 -1.0% 1.01x (?)
XorLoop 24687 24668 -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

@lorentey lorentey force-pushed the hashtable-unification branch 2 times, most recently from 53d1aa4 to b8f8941 Compare August 22, 2018 00:13
@lorentey
Copy link
Member Author

Recent commits attempt to optimize high-level set operations; let's see how much these will help balance the performance impact of resilient hash tables.

@lorentey
Copy link
Member Author

@swift-ci please benchmark

@swiftlang swiftlang deleted a comment from swift-ci Aug 22, 2018
@swiftlang swiftlang deleted a comment from swift-ci Aug 22, 2018
@lorentey
Copy link
Member Author

(I haven't updated lldb's data formatters to read the new storage class layout yet, so the lldb tests will definitely fail.)

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (18)
TEST OLD NEW DELTA SPEEDUP
SetIntersect 587 1022 +74.1% 0.57x
SetUnion 4148 6054 +45.9% 0.69x
CharacterPropertiesStashedMemo 1421 1897 +33.5% 0.75x
CharacterPropertiesPrecomputed 962 1129 +17.4% 0.85x
RangeIterationSigned 171 200 +17.0% 0.86x
DictionaryBridgeToObjC_Access 883 1006 +13.9% 0.88x (?)
SetIsSubsetOf 317 360 +13.6% 0.88x
SetUnion_OfObjects 9710 10957 +12.8% 0.89x
IterateData 1451 1622 +11.8% 0.89x
PrefixWhileSequence 326 364 +11.7% 0.90x
PrefixWhileAnySeqCRangeIter 367 406 +10.6% 0.90x
SetIntersect_OfObjects 1615 1779 +10.2% 0.91x
SetIsSubsetOf_OfObjects 429 468 +9.1% 0.92x
MapReduceAnyCollection 370 399 +7.8% 0.93x
MapReduce 369 397 +7.6% 0.93x
RangeAssignment 338 363 +7.4% 0.93x
RemoveWhereMoveInts 14 15 +7.1% 0.93x
MapReduceString 47 50 +6.4% 0.94x (?)
Improvement (20)
TEST OLD NEW DELTA SPEEDUP
SetExclusiveOr_OfObjects 11279 6743 -40.2% 1.67x
WordCountUniqueASCII 2012 1461 -27.4% 1.38x
SetExclusiveOr 4899 3800 -22.4% 1.29x
DataCopyBytes 532 456 -14.3% 1.17x
ObjectiveCBridgeFromNSSetAnyObject 44474 38130 -14.3% 1.17x (?)
COWArrayGuaranteedParameterOverhead 11528 10094 -12.4% 1.14x
ChainedFilterMap 1407 1246 -11.4% 1.13x
FatCompactMap 1407 1247 -11.4% 1.13x
OpenClose 73 65 -11.0% 1.12x
WordCountUniqueUTF16 4453 3978 -10.7% 1.12x
ObjectiveCBridgeFromNSSetAnyObjectToString 66895 61017 -8.8% 1.10x (?)
DataCount 37 34 -8.1% 1.09x
RandomDoubleLCG 2233 2061 -7.7% 1.08x
StringComparison_fastPrenormal 873 811 -7.1% 1.08x
PrefixAnySeqCRangeIterLazy 33 31 -6.1% 1.06x
PrefixAnySeqCRangeIter 33 31 -6.1% 1.06x
RandomDoubleDef 28553 26936 -5.7% 1.06x
BinaryFloatingPointPropertiesUlp 37 35 -5.4% 1.06x
StringEdits 166662 157987 -5.2% 1.05x (?)
DataReplaceMediumBuffer 12700 12093 -4.8% 1.05x (?)
No Changes (409)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3563 3727 +4.6% 0.96x (?)
AnyHashableWithAClass 89376 88859 -0.6% 1.01x (?)
Array2D 2717 2718 +0.0% 1.00x (?)
ArrayAppend 792 798 +0.8% 0.99x (?)
ArrayAppendArrayOfInt 795 793 -0.3% 1.00x (?)
ArrayAppendAscii 3788 3892 +2.7% 0.97x (?)
ArrayAppendAsciiSubstring 24918 24874 -0.2% 1.00x (?)
ArrayAppendFromGeneric 795 785 -1.3% 1.01x (?)
ArrayAppendGenericStructs 1401 1412 +0.8% 0.99x (?)
ArrayAppendLatin1 39593 39043 -1.4% 1.01x
ArrayAppendLatin1Substring 139501 144015 +3.2% 0.97x
ArrayAppendLazyMap 1338 1338 +0.0% 1.00x
ArrayAppendOptionals 1428 1417 -0.8% 1.01x (?)
ArrayAppendRepeatCol 1330 1338 +0.6% 0.99x (?)
ArrayAppendReserved 527 527 +0.0% 1.00x
ArrayAppendSequence 1119 1119 +0.0% 1.00x
ArrayAppendStrings 6206 6201 -0.1% 1.00x (?)
ArrayAppendToFromGeneric 793 798 +0.6% 0.99x (?)
ArrayAppendToGeneric 795 793 -0.3% 1.00x (?)
ArrayAppendUTF16 40131 38914 -3.0% 1.03x
ArrayAppendUTF16Substring 138012 142060 +2.9% 0.97x
ArrayInClass 85 85 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 152 151 -0.7% 1.01x (?)
ArrayOfGenericRef 4363 4355 -0.2% 1.00x (?)
ArrayOfPOD 185 185 +0.0% 1.00x
ArrayOfRef 4323 4336 +0.3% 1.00x (?)
ArrayPlusEqualArrayOfInt 797 793 -0.5% 1.01x (?)
ArrayPlusEqualFiveElementCollection 4253 4234 -0.4% 1.00x (?)
ArrayPlusEqualSingleElementCollection 796 794 -0.3% 1.00x (?)
ArrayPlusEqualThreeElements 1669 1622 -2.8% 1.03x (?)
ArraySubscript 1569 1576 +0.4% 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 31 31 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 29 28 -3.4% 1.04x
BitCount 169 169 +0.0% 1.00x
ByteSwap 105 100 -4.8% 1.05x
COWTree 3603 3604 +0.0% 1.00x (?)
CSVParsing2 1714 1712 -0.1% 1.00x (?)
CSVParsingAlt2 1758 1798 +2.3% 0.98x (?)
CSVParsingAltIndices2 768 764 -0.5% 1.01x (?)
CStringLongAscii 3529 3529 +0.0% 1.00x
CStringLongNonAscii 2124 2170 +2.2% 0.98x
CStringShortAscii 3163 3158 -0.2% 1.00x (?)
Calculator 210 202 -3.8% 1.04x
CaptureProp 4079 4032 -1.2% 1.01x (?)
CharIndexing_ascii_unicodeScalars 16640 16614 -0.2% 1.00x
CharIndexing_ascii_unicodeScalars_Backwards 16431 16337 -0.6% 1.01x (?)
CharIndexing_chinese_unicodeScalars 12608 12579 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12360 12258 -0.8% 1.01x
CharIndexing_japanese_unicodeScalars 19912 19882 -0.2% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 19563 19404 -0.8% 1.01x
CharIndexing_korean_unicodeScalars 16137 16113 -0.1% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 15850 15712 -0.9% 1.01x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 3035 3009 -0.9% 1.01x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2955 2957 +0.1% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 3794 3758 -0.9% 1.01x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3707 3690 -0.5% 1.00x
CharIndexing_russian_unicodeScalars 13868 13834 -0.2% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 13694 13612 -0.6% 1.01x (?)
CharIndexing_tweet_unicodeScalars 32774 32733 -0.1% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31601 31589 -0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars 22809 22888 +0.3% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 23010 22933 -0.3% 1.00x (?)
CharIteration_ascii_unicodeScalars 20546 20553 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 15471 15478 +0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 15554 15566 +0.1% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 11714 11723 +0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars 24617 24613 -0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 18530 18528 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 19920 19938 +0.1% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 15007 15012 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3678 3693 +0.4% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2799 2802 +0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars 4610 4626 +0.3% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3504 3506 +0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 17112 17112 +0.0% 1.00x
CharIteration_russian_unicodeScalars_Backwards 12895 12892 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 40551 40551 +0.0% 1.00x
CharIteration_tweet_unicodeScalars_Backwards 30571 30938 +1.2% 0.99x
CharIteration_utf16_unicodeScalars 27606 27767 +0.6% 0.99x (?)
CharIteration_utf16_unicodeScalars_Backwards 18412 18576 +0.9% 0.99x
CharacterLiteralsLarge 5833 5789 -0.8% 1.01x (?)
CharacterLiteralsSmall 220 217 -1.4% 1.01x
CharacterPropertiesFetch 4461 4503 +0.9% 0.99x (?)
CharacterPropertiesStashed 1685 1670 -0.9% 1.01x (?)
Chars2 2625 2636 +0.4% 1.00x (?)
ClassArrayGetter2 125 123 -1.6% 1.02x (?)
Combos 493 493 +0.0% 1.00x
DataAccessBytes 1137 1142 +0.4% 1.00x (?)
DataAppendArray 5528 5469 -1.1% 1.01x (?)
DataAppendBytes 5134 5120 -0.3% 1.00x (?)
DataAppendDataLargeToLarge 67391 67668 +0.4% 1.00x (?)
DataAppendDataLargeToMedium 35358 35236 -0.3% 1.00x (?)
DataAppendDataLargeToSmall 34392 34535 +0.4% 1.00x (?)
DataAppendDataMediumToLarge 37910 37523 -1.0% 1.01x (?)
DataAppendDataMediumToMedium 6427 6578 +2.3% 0.98x (?)
DataAppendDataMediumToSmall 5925 5940 +0.3% 1.00x (?)
DataAppendDataSmallToLarge 37169 37014 -0.4% 1.00x (?)
DataAppendDataSmallToMedium 6196 6273 +1.2% 0.99x (?)
DataAppendDataSmallToSmall 5895 5844 -0.9% 1.01x (?)
DataAppendSequence 21201 21196 -0.0% 1.00x (?)
DataMutateBytes 3948 3902 -1.2% 1.01x (?)
DataReplaceLarge 36653 36541 -0.3% 1.00x (?)
DataReplaceLargeBuffer 58195 58492 +0.5% 0.99x (?)
DataReplaceMedium 8103 7834 -3.3% 1.03x (?)
DataReplaceSmall 5704 5589 -2.0% 1.02x (?)
DataReplaceSmallBuffer 9391 9281 -1.2% 1.01x (?)
DataReset 2847 2847 +0.0% 1.00x
DataSetCount 549 549 +0.0% 1.00x
DataSubscript 220 220 +0.0% 1.00x
DictOfArraysToArrayOfDicts 780 791 +1.4% 0.99x (?)
Dictionary 496 504 +1.6% 0.98x
Dictionary2 622 632 +1.6% 0.98x
Dictionary2OfObjects 2081 2082 +0.0% 1.00x (?)
Dictionary3 212 217 +2.4% 0.98x
Dictionary3OfObjects 715 712 -0.4% 1.00x (?)
Dictionary4 297 296 -0.3% 1.00x (?)
Dictionary4Legacy 652 650 -0.3% 1.00x (?)
Dictionary4OfObjects 419 415 -1.0% 1.01x (?)
Dictionary4OfObjectsLegacy 871 839 -3.7% 1.04x (?)
DictionaryBridge 1197 1210 +1.1% 0.99x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 162 162 +0.0% 1.00x
DictionaryCompactMapValuesOfCastValue 10825 10918 +0.9% 0.99x (?)
DictionaryCompactMapValuesOfNilValue 6402 6410 +0.1% 1.00x (?)
DictionaryCopy 97961 99208 +1.3% 0.99x (?)
DictionaryFilter 99098 100210 +1.1% 0.99x (?)
DictionaryGroup 200 202 +1.0% 0.99x
DictionaryGroupOfObjects 2094 2072 -1.1% 1.01x (?)
DictionaryKeysContainsCocoa 38 39 +2.6% 0.97x (?)
DictionaryKeysContainsNative 30 30 +0.0% 1.00x
DictionaryLiteral 1828 1819 -0.5% 1.00x (?)
DictionaryOfObjects 2371 2367 -0.2% 1.00x (?)
DictionaryRemove 5279 5272 -0.1% 1.00x (?)
DictionaryRemoveOfObjects 24994 25046 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutation 243 244 +0.4% 1.00x (?)
DictionarySubscriptDefaultMutationArray 584 584 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 3977 3986 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1675 1679 +0.2% 1.00x (?)
DictionarySwap 938 941 +0.3% 1.00x (?)
DictionarySwapAt 6282 6122 -2.5% 1.03x
DictionarySwapAtOfObjects 51649 51937 +0.6% 0.99x (?)
DictionarySwapOfObjects 8692 8583 -1.3% 1.01x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 76 76 +0.0% 1.00x
DropFirstAnyCollectionLazy 64452 64735 +0.4% 1.00x (?)
DropFirstAnySeqCRangeIter 93 93 +0.0% 1.00x
DropFirstAnySeqCRangeIterLazy 93 93 +0.0% 1.00x
DropFirstAnySeqCntRange 71 71 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 71 71 +0.0% 1.00x
DropFirstAnySequence 1841 1841 +0.0% 1.00x
DropFirstAnySequenceLazy 1842 1841 -0.1% 1.00x (?)
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 29 29 +0.0% 1.00x
DropFirstCountableRangeLazy 29 29 +0.0% 1.00x
DropFirstSequence 2680 2680 +0.0% 1.00x
DropFirstSequenceLazy 2771 2771 +0.0% 1.00x
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 21537 21387 -0.7% 1.01x (?)
DropLastAnySeqCRangeIter 3283 3314 +0.9% 0.99x (?)
DropLastAnySeqCRangeIterLazy 3278 3317 +1.2% 0.99x (?)
DropLastAnySeqCntRange 9 9 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 9 9 +0.0% 1.00x
DropLastAnySequence 4938 4943 +0.1% 1.00x (?)
DropLastAnySequenceLazy 5023 5043 +0.4% 1.00x (?)
DropLastSequence 666 694 +4.2% 0.96x
DropLastSequenceLazy 667 694 +4.0% 0.96x
DropWhileAnyCollection 100 99 -1.0% 1.01x (?)
DropWhileAnyCollectionLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCRangeIter 75 75 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 147 147 +0.0% 1.00x
DropWhileAnySequence 1854 1853 -0.1% 1.00x (?)
DropWhileAnySequenceLazy 1854 1854 +0.0% 1.00x
DropWhileArrayLazy 105 105 +0.0% 1.00x
DropWhileCountableRange 30 30 +0.0% 1.00x
DropWhileCountableRangeLazy 82 82 +0.0% 1.00x
DropWhileSequence 2205 2219 +0.6% 0.99x
DropWhileSequenceLazy 105 105 +0.0% 1.00x
EqualStringSubstring 49 51 +4.1% 0.96x
EqualSubstringString 49 48 -2.0% 1.02x (?)
EqualSubstringSubstring 48 48 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 48 48 +0.0% 1.00x
ErrorHandling 1192 1196 +0.3% 1.00x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1332 1329 -0.2% 1.00x (?)
FilterEvenUsingReduceInto 162 158 -2.5% 1.03x (?)
FloatingPointPrinting_Double_description_small 21514 21602 +0.4% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 21137 21221 +0.4% 1.00x (?)
FloatingPointPrinting_Double_interpolated 61651 61217 -0.7% 1.01x (?)
FloatingPointPrinting_Float80_description_small 28475 28662 +0.7% 0.99x (?)
FloatingPointPrinting_Float80_description_uniform 27903 28128 +0.8% 0.99x (?)
FloatingPointPrinting_Float80_interpolated 64907 64349 -0.9% 1.01x (?)
FloatingPointPrinting_Float_description_small 5714 5716 +0.0% 1.00x (?)
FloatingPointPrinting_Float_description_uniform 5857 5732 -2.1% 1.02x
FloatingPointPrinting_Float_interpolated 37972 37798 -0.5% 1.00x (?)
FrequenciesUsingReduce 4701 4754 +1.1% 0.99x (?)
FrequenciesUsingReduceInto 1483 1495 +0.8% 0.99x (?)
Hanoi 2087 2112 +1.2% 0.99x (?)
HashTest 938 929 -1.0% 1.01x (?)
Histogram 582 583 +0.2% 1.00x (?)
Integrate 334 334 +0.0% 1.00x
Join 160 162 +1.2% 0.99x (?)
LazilyFilteredArrayContains 33485 33499 +0.0% 1.00x (?)
LazilyFilteredArrays2 4581 4586 +0.1% 1.00x (?)
LazilyFilteredRange 3653 3666 +0.4% 1.00x (?)
LessSubstringSubstring 48 50 +4.2% 0.96x
LessSubstringSubstringGenericComparable 48 50 +4.2% 0.96x
LinkedList 7573 7568 -0.1% 1.00x (?)
LuhnAlgoEager 441 445 +0.9% 0.99x (?)
LuhnAlgoLazy 437 444 +1.6% 0.98x (?)
MapReduceAnyCollectionShort 1994 2028 +1.7% 0.98x (?)
MapReduceClass 2981 2979 -0.1% 1.00x (?)
MapReduceClassShort 4553 4523 -0.7% 1.01x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 468 462 -1.3% 1.01x (?)
MapReduceShort 2002 2017 +0.7% 0.99x (?)
MapReduceShortString 20 20 +0.0% 1.00x
Memset 216 215 -0.5% 1.00x (?)
MonteCarloE 10329 10353 +0.2% 1.00x (?)
MonteCarloPi 42863 42918 +0.1% 1.00x (?)
NSDictionaryCastToSwift 7119 7095 -0.3% 1.00x (?)
NSError 165 163 -1.2% 1.01x (?)
NSStringConversion 675 682 +1.0% 0.99x (?)
NibbleSort 3291 3290 -0.0% 1.00x (?)
NopDeinit 30147 30145 -0.0% 1.00x (?)
ObjectAllocation 132 131 -0.8% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObject 25401 25130 -1.1% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4401 4470 +1.6% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 45451 45252 -0.4% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 43773 42634 -2.6% 1.03x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 106906 108090 +1.1% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 3798 3631 -4.4% 1.05x (?)
ObjectiveCBridgeFromNSString 1220 1200 -1.6% 1.02x (?)
ObjectiveCBridgeFromNSStringForced 2438 2443 +0.2% 1.00x (?)
ObjectiveCBridgeStubDataAppend 6157 6077 -1.3% 1.01x (?)
ObjectiveCBridgeStubDateMutation 400 400 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString2 3258 3197 -1.9% 1.02x (?)
ObjectiveCBridgeStubFromNSString 1010 1031 +2.1% 0.98x (?)
ObjectiveCBridgeStubNSDataAppend 2556 2595 +1.5% 0.98x (?)
ObjectiveCBridgeStubToArrayOfNSString2 3928 3916 -0.3% 1.00x (?)
ObjectiveCBridgeStubToNSDate2 1640 1615 -1.5% 1.02x (?)
ObjectiveCBridgeStubToNSString 2346 2348 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 121 127 +5.0% 0.95x
ObjectiveCBridgeStubURLAppendPath2 2762 2786 +0.9% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef2 2754 2771 +0.6% 0.99x (?)
ObjectiveCBridgeToNSArray 14603 14749 +1.0% 0.99x (?)
ObjectiveCBridgeToNSDictionary 27448 27916 +1.7% 0.98x (?)
ObjectiveCBridgeToNSSet 16776 17191 +2.5% 0.98x (?)
ObjectiveCBridgeToNSString 446 447 +0.2% 1.00x (?)
ObserverClosure 2159 2155 -0.2% 1.00x (?)
ObserverForwarderStruct 1181 1188 +0.6% 0.99x (?)
ObserverPartiallyAppliedMethod 3731 3717 -0.4% 1.00x (?)
ObserverUnappliedMethod 2511 2493 -0.7% 1.01x (?)
OpaqueConsumingUsers 4179 4179 +0.0% 1.00x
Phonebook 6858 6858 +0.0% 1.00x
PointerArithmetics 31485 31485 +0.0% 1.00x
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1790 1804 +0.8% 0.99x (?)
PopFrontArrayGeneric 1815 1813 -0.1% 1.00x (?)
PopFrontUnsafePointer 8743 8640 -1.2% 1.01x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnyCollectionLazy 64325 64522 +0.3% 1.00x (?)
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 1378 1377 -0.1% 1.00x (?)
PrefixAnySequenceLazy 1377 1378 +0.1% 1.00x (?)
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 29 29 +0.0% 1.00x
PrefixCountableRangeLazy 29 29 +0.0% 1.00x
PrefixSequence 2209 2222 +0.6% 0.99x
PrefixSequenceLazy 2275 2274 -0.0% 1.00x (?)
PrefixWhileAnyCollection 146 146 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 89 89 +0.0% 1.00x
PrefixWhileAnySeqCRangeIterLazy 89 89 +0.0% 1.00x
PrefixWhileAnySequence 1523 1514 -0.6% 1.01x (?)
PrefixWhileAnySequenceLazy 1390 1391 +0.1% 1.00x (?)
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 904 902 -0.2% 1.00x (?)
PrimsSplit 899 894 -0.6% 1.01x (?)
QueueConcrete 1136 1136 +0.0% 1.00x
QueueGeneric 1128 1128 +0.0% 1.00x
RC4 154 155 +0.6% 0.99x (?)
RGBHistogram 2357 2381 +1.0% 0.99x (?)
RGBHistogramOfObjects 20064 20036 -0.1% 1.00x (?)
Radix2CooleyTukey 12150 11987 -1.3% 1.01x (?)
Radix2CooleyTukeyf 8781 8685 -1.1% 1.01x (?)
RandomIntegersDef 25163 24524 -2.5% 1.03x
RandomIntegersLCG 178 178 +0.0% 1.00x
RandomShuffleDef2 2589 2582 -0.3% 1.00x (?)
RandomShuffleLCG2 1779 1816 +2.1% 0.98x
RangeReplaceableCollectionPlusDefault 1057 1077 +1.9% 0.98x (?)
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 47 49 +4.3% 0.96x
RemoveWhereFilterString 243 235 -3.3% 1.03x
RemoveWhereFilterStrings 435 436 +0.2% 1.00x (?)
RemoveWhereMoveStrings 707 706 -0.1% 1.00x (?)
RemoveWhereQuadraticInts 1283 1283 +0.0% 1.00x
RemoveWhereQuadraticString 359 366 +1.9% 0.98x (?)
RemoveWhereQuadraticStrings 2753 2753 +0.0% 1.00x
RemoveWhereSwapInts 20 20 +0.0% 1.00x
RemoveWhereSwapStrings 862 856 -0.7% 1.01x (?)
ReversedArray2 200 200 +0.0% 1.00x
ReversedBidirectional 13817 13645 -1.2% 1.01x
ReversedDictionary2 317 317 +0.0% 1.00x
RomanNumbers 77284 75639 -2.1% 1.02x
SequenceAlgosAnySequence 12371 12543 +1.4% 0.99x
SequenceAlgosArray 1566 1575 +0.6% 0.99x (?)
SequenceAlgosContiguousArray 1571 1569 -0.1% 1.00x (?)
SequenceAlgosList 1352 1351 -0.1% 1.00x (?)
SequenceAlgosRange 2576 2576 +0.0% 1.00x
SequenceAlgosUnfoldSequence 1105 1105 +0.0% 1.00x
SevenBoom 849 832 -2.0% 1.02x (?)
Sim2DArray 312 312 +0.0% 1.00x
SortAdjacentIntPyramids 10234 10206 -0.3% 1.00x (?)
SortIntPyramid 8752 8761 +0.1% 1.00x (?)
SortLargeExistentials 5426 5433 +0.1% 1.00x (?)
SortLettersInPlace 958 945 -1.4% 1.01x (?)
SortSortedStrings 666 682 +2.4% 0.98x
SortStrings 1442 1466 +1.7% 0.98x
SortStringsUnicode 2036 2011 -1.2% 1.01x
StackPromo 24443 24675 +0.9% 0.99x (?)
StaticArray 9 9 +0.0% 1.00x
StrComplexWalk 1782 1781 -0.1% 1.00x (?)
StrToInt 3196 3275 +2.5% 0.98x
StringAdder 547 548 +0.2% 1.00x (?)
StringBuilder 490 489 -0.2% 1.00x
StringBuilderLong 1237 1217 -1.6% 1.02x (?)
StringBuilderSmallReservingCapacity 500 500 +0.0% 1.00x
StringBuilderWithLongSubstring 1472 1476 +0.3% 1.00x (?)
StringComparison_abnormal 762 773 +1.4% 0.99x (?)
StringComparison_ascii 944 972 +3.0% 0.97x
StringComparison_emoji 852 865 +1.5% 0.98x (?)
StringComparison_latin1 643 639 -0.6% 1.01x (?)
StringComparison_longSharedPrefix 941 944 +0.3% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 1675 1694 +1.1% 0.99x (?)
StringComparison_slowerPrenormal 1789 1850 +3.4% 0.97x (?)
StringComparison_zalgo 112246 111597 -0.6% 1.01x (?)
StringEnumRawValueInitialization 859 862 +0.3% 1.00x (?)
StringEqualPointerComparison 314 314 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2232 2226 -0.3% 1.00x (?)
StringHasPrefixUnicode 98086 98089 +0.0% 1.00x (?)
StringHasSuffixAscii 2318 2290 -1.2% 1.01x
StringHasSuffixUnicode 98891 99571 +0.7% 0.99x (?)
StringHashing_abnormal 1337 1319 -1.3% 1.01x (?)
StringHashing_ascii 34 34 +0.0% 1.00x
StringHashing_emoji 1925 1892 -1.7% 1.02x (?)
StringHashing_fastPrenormal 8370 8299 -0.8% 1.01x (?)
StringHashing_latin1 2557 2540 -0.7% 1.01x (?)
StringHashing_longSharedPrefix 7716 7681 -0.5% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2093 2104 +0.5% 0.99x (?)
StringHashing_slowerPrenormal 2736 2705 -1.1% 1.01x (?)
StringHashing_zalgo 3516 3499 -0.5% 1.00x (?)
StringInterpolation 8895 8926 +0.3% 1.00x (?)
StringInterpolationManySmallSegments 17679 17545 -0.8% 1.01x (?)
StringInterpolationSmall 3990 3903 -2.2% 1.02x
StringMatch 12091 11912 -1.5% 1.02x
StringRemoveDupes 463 469 +1.3% 0.99x (?)
StringUTF16Builder 2544 2538 -0.2% 1.00x (?)
StringUTF16SubstringBuilder 5654 5659 +0.1% 1.00x (?)
StringWalk 1543 1556 +0.8% 0.99x (?)
StringWithCString2 1785 1785 +0.0% 1.00x
StringWordBuilder 2246 2274 +1.2% 0.99x
StringWordBuilderReservingCapacity 1618 1602 -1.0% 1.01x (?)
SubstringComparable 12 12 +0.0% 1.00x
SubstringEqualString 602 617 +2.5% 0.98x
SubstringEquatable 1391 1444 +3.8% 0.96x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 74 74 +0.0% 1.00x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 21453 21517 +0.3% 1.00x (?)
SuffixAnySeqCRangeIter 3593 3625 +0.9% 0.99x (?)
SuffixAnySeqCRangeIterLazy 3593 3633 +1.1% 0.99x (?)
SuffixAnySeqCntRange 14 14 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 14 14 +0.0% 1.00x
SuffixAnySequence 4948 4957 +0.2% 1.00x (?)
SuffixAnySequenceLazy 5085 5080 -0.1% 1.00x (?)
SuffixSequence 3603 3614 +0.3% 1.00x (?)
SuffixSequenceLazy 3603 3612 +0.2% 1.00x (?)
SumUsingReduce 101 97 -4.0% 1.04x
SumUsingReduceInto 101 97 -4.0% 1.04x (?)
SuperChars 19296 19351 +0.3% 1.00x (?)
TwoSum 1369 1360 -0.7% 1.01x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 303 300 -1.0% 1.01x
UTF8Decode_InitDecoding 1340 1350 +0.7% 0.99x (?)
UTF8Decode_InitDecoding_ascii 657 653 -0.6% 1.01x (?)
UTF8Decode_InitFromBytes 1171 1188 +1.5% 0.99x (?)
UTF8Decode_InitFromBytes_ascii 476 464 -2.5% 1.03x (?)
UTF8Decode_InitFromData 1245 1241 -0.3% 1.00x (?)
UTF8Decode_InitFromData_ascii 688 679 -1.3% 1.01x (?)
Walsh 414 412 -0.5% 1.00x (?)
WordCountHistogramASCII 6700 6853 +2.3% 0.98x
WordCountHistogramUTF16 10122 10096 -0.3% 1.00x (?)
XorLoop 393 395 +0.5% 0.99x (?)

Unoptimized (Onone)

Regression (14)
TEST OLD NEW DELTA SPEEDUP
DropFirstArrayLazy 30388 34699 +14.2% 0.88x (?)
PrefixArrayLazy 30619 34831 +13.8% 0.88x (?)
ArrayOfPOD 759 849 +11.9% 0.89x
DictionaryBridgeToObjC_Access 1428 1590 +11.3% 0.90x (?)
PopFrontArrayGeneric 5678 6305 +11.0% 0.90x
TypeFlood 188 206 +9.6% 0.91x (?)
OpaqueConsumingUsers 13417 14659 +9.3% 0.92x
StringUTF16SubstringBuilder 20213 21788 +7.8% 0.93x (?)
RGBHistogramOfObjects 72446 77517 +7.0% 0.93x (?)
SubstringFromLongString 15 16 +6.7% 0.94x
RangeReplaceableCollectionPlusDefault 11486 12175 +6.0% 0.94x
DictionaryCompactMapValuesOfCastValue 121128 128333 +5.9% 0.94x
AngryPhonebook 4991 5274 +5.7% 0.95x (?)
EqualSubstringSubstringGenericEquatable 56 59 +5.4% 0.95x
Improvement (49)
TEST OLD NEW DELTA SPEEDUP
SetIntersect 3794 1257 -66.9% 3.02x
SetExclusiveOr_OfObjects 38841 13748 -64.6% 2.83x
SetExclusiveOr 12925 5349 -58.6% 2.42x
SetIntersect_OfObjects 7633 3688 -51.7% 2.07x
SetIsSubsetOf_OfObjects 1884 966 -48.7% 1.95x
SetUnion_OfObjects 28703 16227 -43.5% 1.77x
SetUnion 10486 8044 -23.3% 1.30x
StringMatch 50579 39423 -22.1% 1.28x
CharIteration_punctuatedJapanese_unicodeScalars 32374 26296 -18.8% 1.23x
SetIsSubsetOf 846 699 -17.4% 1.21x
ObjectiveCBridgeFromNSSetAnyObjectToString 74560 63349 -15.0% 1.18x
CharIteration_punctuated_unicodeScalars_Backwards 62370 53943 -13.5% 1.16x
CharIteration_chinese_unicodeScalars_Backwards 213261 184464 -13.5% 1.16x
UTF8Decode_InitFromData_ascii 803 695 -13.4% 1.16x (?)
FrequenciesUsingReduceInto 3469 3034 -12.5% 1.14x (?)
CharIndexing_tweet_unicodeScalars 710916 624616 -12.1% 1.14x (?)
CharIteration_ascii_unicodeScalars_Backwards 278571 245240 -12.0% 1.14x
CharIndexing_punctuated_unicodeScalars 79619 70391 -11.6% 1.13x (?)
ObjectiveCBridgeFromNSSetAnyObject 46973 41564 -11.5% 1.13x
CharIndexing_korean_unicodeScalars_Backwards 384775 344404 -10.5% 1.12x
CharIndexing_russian_unicodeScalars_Backwards 327431 294576 -10.0% 1.11x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 68423 61640 -9.9% 1.11x (?)
COWArrayGuaranteedParameterOverhead 16343 14759 -9.7% 1.11x (?)
BinaryFloatingPointPropertiesBinade 94 85 -9.6% 1.11x
CharIndexing_japanese_unicodeScalars 423116 383722 -9.3% 1.10x (?)
ArrayAppendAsciiSubstring 77373 70648 -8.7% 1.10x
CharIndexing_russian_unicodeScalars 290786 266164 -8.5% 1.09x (?)
Dictionary4OfObjects 1820 1676 -7.9% 1.09x
ObjectiveCBridgeFromNSSetAnyObjectForced 4964 4576 -7.8% 1.08x (?)
StringEqualPointerComparison 1803 1664 -7.7% 1.08x
SortStringsUnicode 2946 2729 -7.4% 1.08x
CharIndexing_tweet_unicodeScalars_Backwards 757016 701400 -7.3% 1.08x (?)
WordCountUniqueUTF16 9483 8802 -7.2% 1.08x
CharIndexing_punctuated_unicodeScalars_Backwards 83420 77609 -7.0% 1.07x (?)
StackPromo 98457 91732 -6.8% 1.07x (?)
ObjectiveCBridgeStubFromArrayOfNSString2 3608 3373 -6.5% 1.07x (?)
WordCountUniqueASCII 6808 6370 -6.4% 1.07x
FloatingPointPrinting_Double_interpolated 98502 92357 -6.2% 1.07x (?)
DataReplaceMediumBuffer 13025 12238 -6.0% 1.06x (?)
Dictionary3OfObjects 2078 1953 -6.0% 1.06x (?)
CharacterPropertiesStashedMemo 4086 3857 -5.6% 1.06x (?)
DataReplaceSmallBuffer 10190 9622 -5.6% 1.06x (?)
CharIndexing_utf16_unicodeScalars 298068 281589 -5.5% 1.06x (?)
StringHasSuffixAscii 3339 3159 -5.4% 1.06x
StringBuilderWithLongSubstring 3497 3311 -5.3% 1.06x (?)
ArrayPlusEqualThreeElements 9928 9404 -5.3% 1.06x (?)
ObjectiveCBridgeFromNSString 3053 2892 -5.3% 1.06x
SumUsingReduce 164031 155444 -5.2% 1.06x (?)
DictionaryLiteral 8577 8166 -4.8% 1.05x
No Changes (384)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 106069 105472 -0.6% 1.01x
Array2D 503278 502767 -0.1% 1.00x (?)
ArrayAppend 4436 4349 -2.0% 1.02x
ArrayAppendArrayOfInt 866 869 +0.3% 1.00x (?)
ArrayAppendAscii 26498 26806 +1.2% 0.99x (?)
ArrayAppendFromGeneric 872 875 +0.3% 1.00x (?)
ArrayAppendGenericStructs 1514 1503 -0.7% 1.01x (?)
ArrayAppendLatin1 63086 62886 -0.3% 1.00x (?)
ArrayAppendLatin1Substring 159648 158511 -0.7% 1.01x (?)
ArrayAppendLazyMap 165395 164094 -0.8% 1.01x
ArrayAppendOptionals 1518 1496 -1.4% 1.01x (?)
ArrayAppendRepeatCol 192236 192183 -0.0% 1.00x (?)
ArrayAppendReserved 4159 4047 -2.7% 1.03x
ArrayAppendSequence 100396 100793 +0.4% 1.00x
ArrayAppendStrings 6333 6347 +0.2% 1.00x (?)
ArrayAppendToFromGeneric 876 877 +0.1% 1.00x (?)
ArrayAppendToGeneric 880 878 -0.2% 1.00x (?)
ArrayAppendUTF16 63508 63411 -0.2% 1.00x (?)
ArrayAppendUTF16Substring 158407 157704 -0.4% 1.00x (?)
ArrayInClass 4695 4728 +0.7% 0.99x (?)
ArrayLiteral 1581 1582 +0.1% 1.00x (?)
ArrayOfGenericPOD2 1117 1126 +0.8% 0.99x (?)
ArrayOfGenericRef 10257 10255 -0.0% 1.00x (?)
ArrayOfRef 9435 9476 +0.4% 1.00x (?)
ArrayPlusEqualArrayOfInt 873 865 -0.9% 1.01x (?)
ArrayPlusEqualFiveElementCollection 227455 227294 -0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 224119 227752 +1.6% 0.98x (?)
ArraySubscript 107289 109509 +2.1% 0.98x
ArrayValueProp 3219 3271 +1.6% 0.98x
ArrayValueProp2 14771 14934 +1.1% 0.99x (?)
ArrayValueProp3 3831 3824 -0.2% 1.00x (?)
ArrayValueProp4 3713 3713 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 140 137 -2.1% 1.02x
BinaryFloatingPointPropertiesUlp 134 131 -2.2% 1.02x
BitCount 8999 8833 -1.8% 1.02x
ByteSwap 9753 9812 +0.6% 0.99x
COWTree 12360 12300 -0.5% 1.00x (?)
CSVParsing2 7024 6733 -4.1% 1.04x
CSVParsingAlt2 3297 3214 -2.5% 1.03x
CSVParsingAltIndices2 6291 6121 -2.7% 1.03x (?)
CStringLongAscii 3618 3735 +3.2% 0.97x
CStringLongNonAscii 2223 2316 +4.2% 0.96x
CStringShortAscii 6033 6118 +1.4% 0.99x (?)
Calculator 1066 1020 -4.3% 1.05x
CaptureProp 290993 286631 -1.5% 1.02x (?)
ChainedFilterMap 230077 227224 -1.2% 1.01x
CharIndexing_ascii_unicodeScalars 314599 315219 +0.2% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 365381 354431 -3.0% 1.03x (?)
CharIndexing_chinese_unicodeScalars 238148 238215 +0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 275485 269275 -2.3% 1.02x (?)
CharIndexing_japanese_unicodeScalars_Backwards 426288 426915 +0.1% 1.00x (?)
CharIndexing_korean_unicodeScalars 308169 306235 -0.6% 1.01x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 56825 56238 -1.0% 1.01x (?)
CharIndexing_utf16_unicodeScalars_Backwards 320398 308200 -3.8% 1.04x (?)
CharIteration_ascii_unicodeScalars 148905 146737 -1.5% 1.01x (?)
CharIteration_chinese_unicodeScalars 111825 111235 -0.5% 1.01x (?)
CharIteration_japanese_unicodeScalars 176115 176271 +0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 299302 292841 -2.2% 1.02x (?)
CharIteration_korean_unicodeScalars 142675 141746 -0.7% 1.01x (?)
CharIteration_korean_unicodeScalars_Backwards 240411 236966 -1.4% 1.01x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 43489 42635 -2.0% 1.02x
CharIteration_punctuated_unicodeScalars 32967 32919 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 122744 122399 -0.3% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 206357 202963 -1.6% 1.02x (?)
CharIteration_tweet_unicodeScalars 290627 289467 -0.4% 1.00x
CharIteration_tweet_unicodeScalars_Backwards 491384 483126 -1.7% 1.02x (?)
CharIteration_utf16_unicodeScalars 126002 125655 -0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 215889 217134 +0.6% 0.99x (?)
CharacterLiteralsLarge 5774 5713 -1.1% 1.01x (?)
CharacterLiteralsSmall 680 655 -3.7% 1.04x
CharacterPropertiesFetch 5422 5394 -0.5% 1.01x (?)
CharacterPropertiesPrecomputed 2871 2882 +0.4% 1.00x (?)
CharacterPropertiesStashed 2581 2618 +1.4% 0.99x (?)
Chars2 35542 35331 -0.6% 1.01x
ClassArrayGetter2 9488 9510 +0.2% 1.00x
Combos 2504 2428 -3.0% 1.03x (?)
DataAccessBytes 2386 2342 -1.8% 1.02x (?)
DataAppendArray 5746 5690 -1.0% 1.01x (?)
DataAppendBytes 5485 5364 -2.2% 1.02x (?)
DataAppendDataLargeToLarge 67813 69289 +2.2% 0.98x (?)
DataAppendDataLargeToMedium 35535 35901 +1.0% 0.99x (?)
DataAppendDataLargeToSmall 34616 34307 -0.9% 1.01x (?)
DataAppendDataMediumToLarge 37780 38119 +0.9% 0.99x (?)
DataAppendDataMediumToMedium 6664 6820 +2.3% 0.98x (?)
DataAppendDataMediumToSmall 5911 6006 +1.6% 0.98x (?)
DataAppendDataSmallToLarge 37357 37145 -0.6% 1.01x (?)
DataAppendDataSmallToMedium 6273 6318 +0.7% 0.99x (?)
DataAppendDataSmallToSmall 5893 6002 +1.8% 0.98x (?)
DataAppendSequence 1978581 1990792 +0.6% 0.99x
DataCopyBytes 544 541 -0.6% 1.01x (?)
DataCount 223 223 +0.0% 1.00x
DataMutateBytes 5110 5354 +4.8% 0.95x (?)
DataReplaceLarge 36780 37166 +1.0% 0.99x (?)
DataReplaceLargeBuffer 58820 58287 -0.9% 1.01x (?)
DataReplaceMedium 8369 8388 +0.2% 1.00x (?)
DataReplaceSmall 5750 5752 +0.0% 1.00x (?)
DataReset 2842 2873 +1.1% 0.99x (?)
DataSetCount 577 570 -1.2% 1.01x (?)
DataSubscript 443 455 +2.7% 0.97x
DictOfArraysToArrayOfDicts 3805 3636 -4.4% 1.05x (?)
Dictionary 2119 2114 -0.2% 1.00x (?)
Dictionary2 1273 1269 -0.3% 1.00x (?)
Dictionary2OfObjects 4213 4203 -0.2% 1.00x (?)
Dictionary3 800 803 +0.4% 1.00x (?)
Dictionary4 1166 1164 -0.2% 1.00x (?)
Dictionary4Legacy 1425 1426 +0.1% 1.00x (?)
Dictionary4OfObjectsLegacy 2062 2071 +0.4% 1.00x (?)
DictionaryBridge 1283 1311 +2.2% 0.98x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 166 166 +0.0% 1.00x
DictionaryCompactMapValuesOfNilValue 32533 32290 -0.7% 1.01x
DictionaryCopy 298899 296687 -0.7% 1.01x (?)
DictionaryFilter 299120 295284 -1.3% 1.01x (?)
DictionaryGroup 4415 4421 +0.1% 1.00x (?)
DictionaryGroupOfObjects 7049 7072 +0.3% 1.00x (?)
DictionaryKeysContainsCocoa 73 72 -1.4% 1.01x (?)
DictionaryKeysContainsNative 50 50 +0.0% 1.00x
DictionaryOfObjects 5741 6032 +5.1% 0.95x (?)
DictionaryRemove 17321 17270 -0.3% 1.00x (?)
DictionaryRemoveOfObjects 55317 53530 -3.2% 1.03x (?)
DictionarySubscriptDefaultMutation 1721 1728 +0.4% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2001 2008 +0.3% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9366 9323 -0.5% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 5102 5097 -0.1% 1.00x (?)
DictionarySwap 4614 4566 -1.0% 1.01x (?)
DictionarySwapAt 32302 32626 +1.0% 0.99x
DictionarySwapAtOfObjects 112624 114711 +1.9% 0.98x (?)
DictionarySwapOfObjects 20234 19522 -3.5% 1.04x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 16129 16062 -0.4% 1.00x (?)
DropFirstAnyCollectionLazy 107003 108981 +1.8% 0.98x (?)
DropFirstAnySeqCRangeIter 25470 25301 -0.7% 1.01x
DropFirstAnySeqCRangeIterLazy 25394 25366 -0.1% 1.00x (?)
DropFirstAnySeqCntRange 16199 16095 -0.6% 1.01x
DropFirstAnySeqCntRangeLazy 15999 16126 +0.8% 0.99x (?)
DropFirstAnySequence 12454 12354 -0.8% 1.01x
DropFirstAnySequenceLazy 12459 12169 -2.3% 1.02x
DropFirstArray 3503 3501 -0.1% 1.00x
DropFirstCountableRange 345 349 +1.2% 0.99x
DropFirstCountableRangeLazy 36145 36595 +1.2% 0.99x (?)
DropFirstSequence 12225 11856 -3.0% 1.03x
DropFirstSequenceLazy 12017 11877 -1.2% 1.01x
DropLastAnyCollection 5376 5366 -0.2% 1.00x
DropLastAnyCollectionLazy 36408 37959 +4.3% 0.96x
DropLastAnySeqCRangeIter 40067 39949 -0.3% 1.00x (?)
DropLastAnySeqCRangeIterLazy 40095 39961 -0.3% 1.00x (?)
DropLastAnySeqCntRange 5405 5392 -0.2% 1.00x (?)
DropLastAnySeqCntRangeLazy 5393 5373 -0.4% 1.00x (?)
DropLastAnySequence 29166 28778 -1.3% 1.01x
DropLastAnySequenceLazy 29776 28808 -3.3% 1.03x
DropLastSequence 28976 28640 -1.2% 1.01x
DropLastSequenceLazy 28839 28574 -0.9% 1.01x
DropWhileAnyCollection 20768 20839 +0.3% 1.00x (?)
DropWhileAnyCollectionLazy 23926 24192 +1.1% 0.99x
DropWhileAnySeqCRangeIter 26352 26272 -0.3% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 23827 24116 +1.2% 0.99x
DropWhileAnySeqCntRange 20735 20868 +0.6% 0.99x (?)
DropWhileAnySeqCntRangeLazy 23851 24061 +0.9% 0.99x (?)
DropWhileAnySequence 13354 13137 -1.6% 1.02x
DropWhileAnySequenceLazy 11874 11942 +0.6% 0.99x
DropWhileArrayLazy 13435 13452 +0.1% 1.00x (?)
DropWhileCountableRange 5085 5098 +0.3% 1.00x
DropWhileCountableRangeLazy 22971 22722 -1.1% 1.01x
DropWhileSequence 12933 12709 -1.7% 1.02x
DropWhileSequenceLazy 11491 11498 +0.1% 1.00x (?)
EqualStringSubstring 71 72 +1.4% 0.99x
EqualSubstringString 71 72 +1.4% 0.99x
EqualSubstringSubstring 72 73 +1.4% 0.99x
ErrorHandling 5296 5344 +0.9% 0.99x (?)
ExclusivityGlobal 189 191 +1.1% 0.99x (?)
ExclusivityIndependent 71 73 +2.8% 0.97x (?)
FatCompactMap 286110 285038 -0.4% 1.00x (?)
FilterEvenUsingReduce 3578 3597 +0.5% 0.99x (?)
FilterEvenUsingReduceInto 1846 1835 -0.6% 1.01x (?)
FloatingPointPrinting_Double_description_small 22329 22373 +0.2% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 34154 34800 +1.9% 0.98x
FloatingPointPrinting_Float80_description_small 29631 29890 +0.9% 0.99x (?)
FloatingPointPrinting_Float80_description_uniform 56901 58571 +2.9% 0.97x (?)
FloatingPointPrinting_Float80_interpolated 116002 118024 +1.7% 0.98x (?)
FloatingPointPrinting_Float_description_small 6871 6608 -3.8% 1.04x
FloatingPointPrinting_Float_description_uniform 17655 17399 -1.5% 1.01x
FloatingPointPrinting_Float_interpolated 65613 63880 -2.6% 1.03x (?)
FrequenciesUsingReduce 10412 10554 +1.4% 0.99x (?)
Hanoi 19284 19484 +1.0% 0.99x (?)
HashTest 19591 20307 +3.7% 0.96x (?)
Histogram 6025 6071 +0.8% 0.99x (?)
Integrate 587 587 +0.0% 1.00x
IterateData 4986 4997 +0.2% 1.00x (?)
Join 177 178 +0.6% 0.99x
LazilyFilteredArrayContains 743496 731189 -1.7% 1.02x
LazilyFilteredArrays2 91356 90175 -1.3% 1.01x
LazilyFilteredRange 557079 560133 +0.5% 0.99x
LessSubstringSubstring 73 73 +0.0% 1.00x
LessSubstringSubstringGenericComparable 57 58 +1.8% 0.98x
LinkedList 32583 32345 -0.7% 1.01x
LuhnAlgoEager 5629 5678 +0.9% 0.99x (?)
LuhnAlgoLazy 5923 5934 +0.2% 1.00x (?)
MapReduce 25070 24963 -0.4% 1.00x (?)
MapReduceAnyCollection 25152 24894 -1.0% 1.01x
MapReduceAnyCollectionShort 37198 36646 -1.5% 1.02x (?)
MapReduceClass 28950 28831 -0.4% 1.00x (?)
MapReduceClassShort 40011 40218 +0.5% 0.99x (?)
MapReduceLazyCollection 22098 22635 +2.4% 0.98x (?)
MapReduceLazyCollectionShort 32194 33707 +4.7% 0.96x
MapReduceLazySequence 19894 19665 -1.2% 1.01x (?)
MapReduceSequence 29795 29609 -0.6% 1.01x (?)
MapReduceShort 36892 36549 -0.9% 1.01x (?)
MapReduceShortString 215 223 +3.7% 0.96x (?)
MapReduceString 1692 1714 +1.3% 0.99x (?)
Memset 26597 26855 +1.0% 0.99x
MonteCarloE 1133097 1161327 +2.5% 0.98x
MonteCarloPi 5186227 5309676 +2.4% 0.98x
NSDictionaryCastToSwift 8437 8041 -4.7% 1.05x (?)
NSError 611 641 +4.9% 0.95x (?)
NSStringConversion 744 713 -4.2% 1.04x
NibbleSort 369393 368748 -0.2% 1.00x (?)
NopDeinit 197731 202371 +2.3% 0.98x
ObjectAllocation 1228 1246 +1.5% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObject 29616 28400 -4.1% 1.04x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 9166 9159 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 49692 47576 -4.3% 1.04x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 46951 45408 -3.3% 1.03x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 112806 113668 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSStringForced 2570 2589 +0.7% 0.99x (?)
ObjectiveCBridgeStubDataAppend 6679 6485 -2.9% 1.03x (?)
ObjectiveCBridgeStubDateMutation 802 774 -3.5% 1.04x
ObjectiveCBridgeStubFromNSString 1073 1047 -2.4% 1.02x (?)
ObjectiveCBridgeStubNSDataAppend 3009 2939 -2.3% 1.02x (?)
ObjectiveCBridgeStubToArrayOfNSString2 3980 3907 -1.8% 1.02x (?)
ObjectiveCBridgeStubToNSDate2 1698 1637 -3.6% 1.04x (?)
ObjectiveCBridgeStubToNSString 2420 2421 +0.0% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 153 150 -2.0% 1.02x
ObjectiveCBridgeStubURLAppendPath2 2838 2885 +1.7% 0.98x (?)
ObjectiveCBridgeStubURLAppendPathRef2 2908 2928 +0.7% 0.99x (?)
ObjectiveCBridgeToNSArray 14615 15018 +2.8% 0.97x (?)
ObjectiveCBridgeToNSDictionary 30005 29968 -0.1% 1.00x (?)
ObjectiveCBridgeToNSSet 18320 18394 +0.4% 1.00x (?)
ObjectiveCBridgeToNSString 537 533 -0.7% 1.01x
ObserverClosure 6384 6379 -0.1% 1.00x (?)
ObserverForwarderStruct 4448 4478 +0.7% 0.99x
ObserverPartiallyAppliedMethod 7897 7929 +0.4% 1.00x (?)
ObserverUnappliedMethod 7860 7874 +0.2% 1.00x (?)
OpenClose 572 575 +0.5% 0.99x
Phonebook 16021 15789 -1.4% 1.01x
PointerArithmetics 418143 417975 -0.0% 1.00x (?)
PolymorphicCalls 2394 2404 +0.4% 1.00x (?)
PopFrontArray 4416 4379 -0.8% 1.01x (?)
PopFrontUnsafePointer 11939 11950 +0.1% 1.00x (?)
PrefixAnyCollection 16081 16081 +0.0% 1.00x
PrefixAnyCollectionLazy 108700 112688 +3.7% 0.96x (?)
PrefixAnySeqCRangeIter 20410 20218 -0.9% 1.01x (?)
PrefixAnySeqCRangeIterLazy 20254 20351 +0.5% 1.00x (?)
PrefixAnySeqCntRange 16168 16086 -0.5% 1.01x
PrefixAnySeqCntRangeLazy 16044 16073 +0.2% 1.00x (?)
PrefixAnySequence 9961 9841 -1.2% 1.01x (?)
PrefixAnySequenceLazy 9977 10007 +0.3% 1.00x (?)
PrefixArray 3593 3497 -2.7% 1.03x (?)
PrefixCountableRange 344 350 +1.7% 0.98x
PrefixCountableRangeLazy 36189 36163 -0.1% 1.00x (?)
PrefixSequence 9567 9615 +0.5% 1.00x (?)
PrefixSequenceLazy 9634 9621 -0.1% 1.00x
PrefixWhileAnyCollection 30245 30177 -0.2% 1.00x
PrefixWhileAnyCollectionLazy 19814 19909 +0.5% 1.00x (?)
PrefixWhileAnySeqCRangeIter 33783 33976 +0.6% 0.99x
PrefixWhileAnySeqCRangeIterLazy 19674 19717 +0.2% 1.00x (?)
PrefixWhileAnySequence 25531 25518 -0.1% 1.00x (?)
PrefixWhileAnySequenceLazy 10767 10668 -0.9% 1.01x
PrefixWhileArray 10370 10476 +1.0% 0.99x (?)
PrefixWhileArrayLazy 11820 11791 -0.2% 1.00x (?)
PrefixWhileSequence 25087 25153 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 10448 10294 -1.5% 1.01x
Prims 8769 8961 +2.2% 0.98x (?)
PrimsSplit 8837 8820 -0.2% 1.00x (?)
QueueConcrete 14007 13897 -0.8% 1.01x
QueueGeneric 18778 18700 -0.4% 1.00x (?)
RC4 12881 12975 +0.7% 0.99x
RGBHistogram 22300 22253 -0.2% 1.00x (?)
Radix2CooleyTukey 47727 47416 -0.7% 1.01x (?)
Radix2CooleyTukeyf 41333 41158 -0.4% 1.00x (?)
RandomDoubleDef 85349 86472 +1.3% 0.99x (?)
RandomDoubleLCG 55294 55392 +0.2% 1.00x (?)
RandomIntegersDef 43927 44482 +1.3% 0.99x (?)
RandomIntegersLCG 32669 32838 +0.5% 0.99x
RandomShuffleDef2 7186 7169 -0.2% 1.00x (?)
RandomShuffleLCG2 48138 47370 -1.6% 1.02x
RangeAssignment 2734 2780 +1.7% 0.98x (?)
RangeIterationSigned 14677 14888 +1.4% 0.99x
RecursiveOwnedParameter 6055 6049 -0.1% 1.00x (?)
RemoveWhereFilterInts 2012 2039 +1.3% 0.99x
RemoveWhereFilterString 1297 1293 -0.3% 1.00x
RemoveWhereFilterStrings 2534 2537 +0.1% 1.00x (?)
RemoveWhereMoveInts 3338 3351 +0.4% 1.00x
RemoveWhereMoveStrings 3872 3871 -0.0% 1.00x (?)
RemoveWhereQuadraticInts 8542 8473 -0.8% 1.01x (?)
RemoveWhereQuadraticString 2603 2593 -0.4% 1.00x (?)
RemoveWhereQuadraticStrings 10150 10117 -0.3% 1.00x (?)
RemoveWhereSwapInts 5988 5985 -0.1% 1.00x (?)
RemoveWhereSwapStrings 6687 6666 -0.3% 1.00x
ReversedArray2 14351 14291 -0.4% 1.00x
ReversedBidirectional 43367 44252 +2.0% 0.98x
ReversedDictionary2 15543 15611 +0.4% 1.00x (?)
RomanNumbers 1380212 1431478 +3.7% 0.96x (?)
SequenceAlgosAnySequence 13713 13658 -0.4% 1.00x
SequenceAlgosArray 736512 739417 +0.4% 1.00x
SequenceAlgosContiguousArray 309010 310681 +0.5% 0.99x
SequenceAlgosList 8568 8619 +0.6% 0.99x (?)
SequenceAlgosRange 1338772 1340166 +0.1% 1.00x (?)
SequenceAlgosUnfoldSequence 6316 6300 -0.3% 1.00x (?)
SevenBoom 1042 1048 +0.6% 0.99x (?)
Sim2DArray 30357 30360 +0.0% 1.00x (?)
SortAdjacentIntPyramids 199180 201548 +1.2% 0.99x
SortIntPyramid 233873 236951 +1.3% 0.99x
SortLargeExistentials 9716 9635 -0.8% 1.01x
SortLettersInPlace 1605 1594 -0.7% 1.01x
SortSortedStrings 876 874 -0.2% 1.00x
SortStrings 1821 1800 -1.2% 1.01x
StaticArray 2357 2335 -0.9% 1.01x (?)
StrComplexWalk 6825 6830 +0.1% 1.00x (?)
StrToInt 79817 81709 +2.4% 0.98x
StringAdder 749 725 -3.2% 1.03x
StringBuilder 4975 4943 -0.6% 1.01x (?)
StringBuilderLong 1446 1447 +0.1% 1.00x (?)
StringBuilderSmallReservingCapacity 4978 4964 -0.3% 1.00x (?)
StringComparison_abnormal 1290 1320 +2.3% 0.98x (?)
StringComparison_ascii 8902 8793 -1.2% 1.01x
StringComparison_emoji 1990 1982 -0.4% 1.00x (?)
StringComparison_fastPrenormal 4890 4863 -0.6% 1.01x
StringComparison_latin1 3801 3794 -0.2% 1.00x
StringComparison_longSharedPrefix 2351 2346 -0.2% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 3686 3684 -0.1% 1.00x (?)
StringComparison_slowerPrenormal 4132 4146 +0.3% 1.00x (?)
StringComparison_zalgo 114977 114043 -0.8% 1.01x (?)
StringEdits 358621 341856 -4.7% 1.05x
StringEnumRawValueInitialization 22194 22607 +1.9% 0.98x
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 194 195 +0.5% 0.99x (?)
StringHasPrefixAscii 3261 3136 -3.8% 1.04x
StringHasPrefixUnicode 99962 99914 -0.0% 1.00x (?)
StringHasSuffixUnicode 100504 100482 -0.0% 1.00x (?)
StringHashing_abnormal 1468 1472 +0.3% 1.00x (?)
StringHashing_ascii 212 210 -0.9% 1.01x
StringHashing_emoji 2183 2183 +0.0% 1.00x
StringHashing_fastPrenormal 8644 8657 +0.2% 1.00x (?)
StringHashing_latin1 2780 2819 +1.4% 0.99x (?)
StringHashing_longSharedPrefix 7874 7854 -0.3% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2408 2441 +1.4% 0.99x (?)
StringHashing_slowerPrenormal 2958 2974 +0.5% 0.99x (?)
StringHashing_zalgo 3645 3670 +0.7% 0.99x (?)
StringInterpolation 11255 11653 +3.5% 0.97x (?)
StringInterpolationManySmallSegments 18425 18106 -1.7% 1.02x (?)
StringInterpolationSmall 5870 5803 -1.1% 1.01x (?)
StringRemoveDupes 703 705 +0.3% 1.00x (?)
StringUTF16Builder 7463 7530 +0.9% 0.99x (?)
StringWalk 13678 13714 +0.3% 1.00x (?)
StringWithCString2 1787 1787 +0.0% 1.00x
StringWordBuilder 2538 2526 -0.5% 1.00x (?)
StringWordBuilderReservingCapacity 1855 1825 -1.6% 1.02x
SubstringComparable 1571 1581 +0.6% 0.99x
SubstringEqualString 1714 1726 +0.7% 0.99x (?)
SubstringEquatable 5268 5293 +0.5% 1.00x (?)
SubstringFromLongStringGeneric 103 104 +1.0% 0.99x
SuffixAnyCollection 5389 5379 -0.2% 1.00x (?)
SuffixAnyCollectionLazy 36308 37242 +2.6% 0.97x (?)
SuffixAnySeqCRangeIter 36168 36282 +0.3% 1.00x (?)
SuffixAnySeqCRangeIterLazy 36377 36221 -0.4% 1.00x (?)
SuffixAnySeqCntRange 5410 5391 -0.4% 1.00x (?)
SuffixAnySeqCntRangeLazy 5368 5377 +0.2% 1.00x (?)
SuffixAnySequence 25333 25129 -0.8% 1.01x
SuffixAnySequenceLazy 25151 25109 -0.2% 1.00x (?)
SuffixSequence 25076 24911 -0.7% 1.01x
SuffixSequenceLazy 25091 25105 +0.1% 1.00x (?)
SumUsingReduceInto 149086 148506 -0.4% 1.00x (?)
SuperChars 77324 80386 +4.0% 0.96x (?)
TwoSum 3765 3728 -1.0% 1.01x (?)
UTF8Decode 28857 29022 +0.6% 0.99x (?)
UTF8Decode_InitDecoding 1384 1426 +3.0% 0.97x (?)
UTF8Decode_InitDecoding_ascii 928 926 -0.2% 1.00x (?)
UTF8Decode_InitFromBytes 1175 1198 +2.0% 0.98x (?)
UTF8Decode_InitFromBytes_ascii 486 499 +2.7% 0.97x (?)
UTF8Decode_InitFromData 1245 1258 +1.0% 0.99x (?)
Walsh 7173 7241 +0.9% 0.99x
WordCountHistogramASCII 37069 36520 -1.5% 1.02x (?)
WordCountHistogramUTF16 42350 41898 -1.1% 1.01x (?)
XorLoop 12873 12906 +0.3% 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

@lorentey
Copy link
Member Author

TEST OLD NEW DELTA SPEEDUP
SetIntersect 587 1022 +74.1% 0.57x
SetUnion 4148 6054 +45.9% 0.69x

That's funny! These results are the opposite of my own Set<Int> benchmarking.

@lorentey
Copy link
Member Author

set - 4 tasks

Separately benchmarking SetIntersect in detail reveals an important clue -- the benchmark as it currently stands measures the intersection between two non-overlapping sets. I can't locally reproduce the +75% slowdown -- this use-case benchmarks roughly the same before/after this PR.

Fixing the benchmark to include a non-empty intersection (with ~25% of elements in both sets) shows clear improvements over the non-overlapping case. (See SetIntersection2 above.) This is rather surprising, as the algorithm actually needs to do more work in the overlapping case, not less.

@lorentey
Copy link
Member Author

SetIntersection uses a random number generator, which generates duplicate elements in the SetIntersection2 case, making SetIntersection and SetIntersection2 not directly comparable. I submitted #18928 to fix these benchmarks on master.

Updated chart:
set - 4 tasks

Note how the new algorithm is faster at almost every stage. It gets relatively faster as the % of common elements increase. The intersection of two equal sets is calculated particularly efficiently:

set - 4 tasks

The new algorithm detects that there is no need to construct a third set, making it even faster than the 0% case for many sizes. (This is because looking up an existing element is faster than one that's not in the hash table.)

@lorentey lorentey force-pushed the hashtable-unification branch from b8f8941 to 84a405a Compare August 23, 2018 20:57
@lorentey
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 84a405a5fd4452f64dcec6062daf43593eead3f4

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 84a405a5fd4452f64dcec6062daf43593eead3f4

@lorentey
Copy link
Member Author

@swift-ci please test linux platform

@lorentey
Copy link
Member Author

@swift-ci please smoke benchmark staging

@swift-ci
Copy link
Contributor

Build comment file:

Performance: -O

TEST OLD NEW DELTA SPEEDUP
Regression
SetSubtractingInt0 71 169 +138.0% 0.42x
SetIntersectionInt0 58 106 +82.8% 0.55x
SetIsSubsetInt100 287 511 +78.0% 0.56x
SetIntersect 592 1048 +77.0% 0.56x
SetIsSubsetInt50 143 246 +72.0% 0.58x
SetSubtractingInt25 146 246 +68.5% 0.59x
SetIsSubsetInt25 73 116 +58.9% 0.63x
SetSubtractingInt50 184 288 +56.5% 0.64x
SetSubtractingBox0 171 261 +52.6% 0.66x
SetSubtractingInt100 243 349 +43.6% 0.70x
DictionarySwapAt 6385 8755 +37.1% 0.73x
CharacterPropertiesStashedMemo 1451 1874 +29.2% 0.77x
DictionaryBridgeToObjC_Access 916 1114 +21.6% 0.82x (?)
SetIsSubsetInt0 238 289 +21.4% 0.82x
SetSubtractingBox25 369 443 +20.1% 0.83x
SetIsSubsetBox25 178 208 +16.9% 0.86x
SetUnionInt100 100 116 +16.0% 0.86x
CharacterPropertiesPrecomputed 970 1114 +14.8% 0.87x
SetIntersectionBox0 164 178 +8.5% 0.92x
Improvement
SetIntersectionInt100 465 133 -71.4% 3.50x
SetExclusiveOr_OfObjects 11084 6747 -39.1% 1.64x
SetSymmetricDifferenceBox0 1108 675 -39.1% 1.64x
SetIntersectionInt50 262 161 -38.5% 1.63x
SetIntersectionBox25 365 238 -34.8% 1.53x
SetUnionInt25 247 172 -30.4% 1.44x
ObjectiveCBridgeFromNSSetAnyObject 53885 37749 -29.9% 1.43x
WordCountUniqueASCII 2076 1486 -28.4% 1.40x
SetUnion_OfObjects 9596 6924 -27.8% 1.39x
SetUnionBox0 960 693 -27.8% 1.39x
SetUnionBox25 528 384 -27.3% 1.37x
SetSymmetricDifferenceInt0 483 362 -25.1% 1.33x
SetExclusiveOr 4808 3617 -24.8% 1.33x
SetUnionInt50 212 164 -22.6% 1.29x
SetSymmetricDifferenceBox25 729 599 -17.8% 1.22x
WordCountUniqueUTF16 4719 3914 -17.1% 1.21x
SetIntersectionInt25 161 134 -16.8% 1.20x
StringEdits 174455 152229 -12.7% 1.15x
IterateData 1750 1562 -10.7% 1.12x
SetUnionInt0 422 379 -10.2% 1.11x
SetUnion 4210 3787 -10.0% 1.11x
SetSymmetricDifferenceInt100 306 283 -7.5% 1.08x
StringComparison_ascii 1067 988 -7.4% 1.08x
RemoveWhereMoveInts 15 14 -6.7% 1.07x (?)

Performance: -Osize

TEST OLD NEW DELTA SPEEDUP
Regression
SetSubtractingInt0 87 162 +86.2% 0.54x
SetIntersectionInt0 60 108 +80.0% 0.56x
SetIntersect 616 1080 +75.3% 0.57x
SetIsSubsetInt100 297 486 +63.6% 0.61x
SetIsSubsetInt50 148 227 +53.4% 0.65x
SetSubtractingBox0 173 263 +52.0% 0.66x
SetSubtractingInt25 159 241 +51.6% 0.66x
SetIsSubsetInt25 74 108 +45.9% 0.69x
SetSubtractingInt50 206 291 +41.3% 0.71x
SetSymmetricDifferenceInt25 339 467 +37.8% 0.73x
SetSubtractingInt100 262 353 +34.7% 0.74x
SetSymmetricDifferenceInt100 311 419 +34.7% 0.74x
SetSymmetricDifferenceInt50 337 441 +30.9% 0.76x
SetIsSubsetBox25 183 221 +20.8% 0.83x
SetSubtractingBox25 368 437 +18.7% 0.84x
Improvement
SetIntersectionInt100 477 151 -68.3% 3.16x
SetSymmetricDifferenceBox0 1122 730 -34.9% 1.54x
SetIntersectionInt50 266 174 -34.6% 1.53x
SetExclusiveOr_OfObjects 11173 7336 -34.3% 1.52x
SetIntersectionBox25 370 245 -33.8% 1.51x
SetUnionInt25 247 171 -30.8% 1.44x
WordCountUniqueASCII 2060 1449 -29.7% 1.42x
SetUnion_OfObjects 9722 6929 -28.7% 1.40x
SetUnionBox0 971 694 -28.5% 1.40x
SetUnionBox25 531 385 -27.5% 1.38x
MapReduceLazyCollectionShort 85 62 -27.1% 1.37x
SetUnionInt50 212 167 -21.2% 1.27x
WordCountUniqueUTF16 4872 3905 -19.8% 1.25x
SetExclusiveOr 5013 4250 -15.2% 1.18x
SetSymmetricDifferenceInt0 500 426 -14.8% 1.17x
SetIntersectionInt25 166 142 -14.5% 1.17x
SetUnion 4503 3852 -14.5% 1.17x
SetUnionInt0 448 384 -14.3% 1.17x
IterateData 1829 1635 -10.6% 1.12x
DropFirstAnySeqCRangeIterLazy 27649 24727 -10.6% 1.12x
DropFirstAnySeqCRangeIter 27649 24730 -10.6% 1.12x
SetSymmetricDifferenceBox25 739 677 -8.4% 1.09x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein).

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

- Use bitmaps to eliminate the need for multiple passes on the elements of the input sequence.
- When given two sets, prefer calculating the intersection on the native one. When both sets are native, iterate over the one with fewest elements.
- Use bitmaps to eliminate the need for multiple passes on the elements of the input sequence.
- When given two sets, prefer calculating the intersection on the native one. When both sets are native, iterate over the one with fewest elements.
- The union operation is odd because it seems best to base it on its mutating variant.
- When given the option, start with a native set. This may prevent one round of rehashing.
- When both sides are sets, they establish a minimum bound on the result's element count.
Exposing the number of buckets allows _NativeSet.reallocate() to be made inlinable, which seems to be important for performance.
I don’t expect we’ll ever need to change this, but the typealias is a readability win.
Set.union and .symmetricDifference still exhibit quadratic behaviour with similar-sized but almost disjunct input sets.

This was due to hash values correlation between hash tables of the same size. Enabling true per-instance seeding fixes this.
Evidently it has no effect on benchmarks.
Leaving this overridable caused a ~2x slowdown on Set<Int>.contains benchmarks. D’oh.
This gets us a nice baseline to start with.
- Reduce the number of hash table buckets by a factor of 8.
- Increase the size of buckets from 1 to 8 entries.
- Use SIMD within a register to find matching entries, instead of iterating over individual bytes.
- Simplify generated code; eliminate obvious inefficiencies.
- Revive guaranteedNative trick; removing the bridged branch does have a measurable impact for contains at least. (Apart from code size benefits)

Lookups in sets are still not quite as fast as on master for small sets (up to ~1k elements) when the element type has fast equality checks — I believe this is because the SIMD approach has worse latency than direct lookup, and the lookup chains aren’t long enough to take advantage of higher throughput. (The latency difference only matters when the set is fully cached, which is why the slowdown only occurs for small sets.)
@lorentey lorentey force-pushed the hashtable-unification branch from 9b0e735 to d4c4171 Compare September 8, 2018 08:51
@lorentey
Copy link
Member Author

lorentey commented Sep 8, 2018

@swift-ci please smoke benchmark staging

1 similar comment
@lorentey
Copy link
Member Author

lorentey commented Sep 8, 2018

@swift-ci please smoke benchmark staging

@swift-ci
Copy link
Contributor

swift-ci commented Sep 8, 2018

Build comment file:

Build failed before running benchmark.


@lorentey
Copy link
Member Author

lorentey commented Sep 9, 2018

@swift-ci please smoke benchmark staging

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