Skip to content

Declare some FloatingPointSign members explicitly for @inlinable #16043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2018

Conversation

jrose-apple
Copy link
Contributor

The compiler can synthesize these, but it doesn't mark them @inlinable, since in the general case they're just a "default" implementation and not "the only implementation forever". But for a two-element enum that's based on a part of IEEE 754, it's probably safe to assume this is the only implementation forever, and that can be important for performance.

SR-7094 / rdar://problem/38030106

The compiler can synthesize these, but it doesn't mark them
@inlinable, since in the general case they're just a "default"
implementation and not "the only implementation forever". But for a
two-element enum that's based on a part of IEEE 754, it's probably
safe to assume this is the only implementation forever, and that
can be important for performance.

https://bugs.swift.org/browse/SR-7094
@jrose-apple
Copy link
Contributor Author

@swift-ci Please benchmark

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@stephentyrone
Copy link
Contributor

Confirming that we will never want to change these.

@jrose-apple
Copy link
Contributor Author

Also @natecook1000 I deliberately didn't put any doc comments on these, assuming they'd be mirrored down from the protocols like they were before. Is that correct?

@natecook1000
Copy link
Member

@jrose-apple I don't know the current state of docs inheritance—it hasn't been great lately. I can follow up once these are in…

}

@inlinable
public static func ==(a: FloatingPointSign, b: FloatingPointSign) -> Bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a default == witness for RawRepresentable things somewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We probably do, but a client isn't supposed to inline that when using it on someone else's type.


@inlinable
public init?(rawValue: Int) {
switch rawValue {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we synthesize @inlinable members for any frozen RawRepresentable enum?

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

I'm not a fan of this approach. Are there other RawRepresentable enums in the standard library?

@jrose-apple
Copy link
Contributor Author

jrose-apple commented Apr 19, 2018

See the discussion in #15589, but the short form is "this is the only such enum; we can decide what to do in the general case later".

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (23)
TEST OLD NEW DELTA SPEEDUP
PrefixWhileAnySeqCRangeIter 8946 12248 +36.9% 0.73x
FatCompactMap 203748 273890 +34.4% 0.74x
PrefixWhileAnySequence 10130 13419 +32.5% 0.75x
DropLastAnySeqCRangeIterLazy 3616 4747 +31.3% 0.76x
DropLastAnySeqCRangeIter 3618 4729 +30.7% 0.77x
SuffixSequence 3681 4742 +28.8% 0.78x (?)
SuffixSequenceLazy 3677 4734 +28.7% 0.78x (?)
SuffixAnySeqCRangeIter 3837 4924 +28.3% 0.78x
SuffixAnySeqCRangeIterLazy 3841 4919 +28.1% 0.78x
SuffixAnySequenceLazy 5107 6245 +22.3% 0.82x
DropLastAnySequence 5020 6095 +21.4% 0.82x
SuffixAnySequence 5040 6103 +21.1% 0.83x
DropLastAnySequenceLazy 5145 6230 +21.1% 0.83x (?)
RangeIterationSigned 171 200 +17.0% 0.86x
CharIndexing_tweet_unicodeScalars 30922 33818 +9.4% 0.91x
DropLastCountableRange 11 12 +9.1% 0.92x
CharIndexing_japanese_unicodeScalars 19091 20776 +8.8% 0.92x
CharIndexing_korean_unicodeScalars 15468 16826 +8.8% 0.92x
CharIndexing_russian_unicodeScalars 13295 14462 +8.8% 0.92x
CharIndexing_ascii_unicodeScalars 15952 17344 +8.7% 0.92x
CharIndexing_chinese_unicodeScalars 12080 13134 +8.7% 0.92x
CharIndexing_punctuated_unicodeScalars 3624 3914 +8.0% 0.93x
CharIndexing_punctuatedJapanese_unicodeScalars 2899 3125 +7.8% 0.93x
Improvement (16)
TEST OLD NEW DELTA SPEEDUP
StringBuilder 804 731 -9.1% 1.10x
StringAdder 771 701 -9.1% 1.10x
DictionarySwapAt 7399 6890 -6.9% 1.07x
StringHasPrefixAscii 2090 1947 -6.8% 1.07x
Hanoi 2230 2081 -6.7% 1.07x
StringComparison_fastPrenormal 824 771 -6.4% 1.07x
StringHasSuffixAscii 2233 2090 -6.4% 1.07x
DataReplaceSmallBuffer 10197 9546 -6.4% 1.07x (?)
StrToInt 3014 2824 -6.3% 1.07x
StringComparison_latin1 646 606 -6.2% 1.07x
LazilyFilteredArrayContains 38637 36259 -6.2% 1.07x
StringWordBuilder 2460 2318 -5.8% 1.06x
StringMatch 11698 11041 -5.6% 1.06x
DataCopyBytes 2638 2495 -5.4% 1.06x (?)
StringUTF16SubstringBuilder 6159 5839 -5.2% 1.05x (?)
Integrate 354 336 -5.1% 1.05x
No Changes (383)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3725 3733 +0.2% 1.00x (?)
AnyHashableWithAClass 84489 84163 -0.4% 1.00x (?)
Array2D 2547 2517 -1.2% 1.01x (?)
ArrayAppend 1073 1064 -0.8% 1.01x (?)
ArrayAppendArrayOfInt 795 797 +0.3% 1.00x (?)
ArrayAppendAscii 14060 13873 -1.3% 1.01x
ArrayAppendFromGeneric 796 798 +0.3% 1.00x (?)
ArrayAppendGenericStructs 1425 1427 +0.1% 1.00x (?)
ArrayAppendLatin1 40031 39946 -0.2% 1.00x (?)
ArrayAppendLazyMap 1341 1332 -0.7% 1.01x (?)
ArrayAppendOptionals 1426 1426 +0.0% 1.00x
ArrayAppendRepeatCol 1331 1339 +0.6% 0.99x (?)
ArrayAppendReserved 801 805 +0.5% 1.00x (?)
ArrayAppendSequence 1120 1120 +0.0% 1.00x
ArrayAppendStrings 6247 6256 +0.1% 1.00x (?)
ArrayAppendToFromGeneric 799 799 +0.0% 1.00x
ArrayAppendToGeneric 798 799 +0.1% 1.00x (?)
ArrayAppendUTF16 39714 39990 +0.7% 0.99x (?)
ArrayInClass 86 85 -1.2% 1.01x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 150 150 +0.0% 1.00x
ArrayOfGenericRef 4375 4378 +0.1% 1.00x (?)
ArrayOfPOD 183 181 -1.1% 1.01x (?)
ArrayOfRef 4349 4348 -0.0% 1.00x (?)
ArrayPlusEqualArrayOfInt 798 787 -1.4% 1.01x (?)
ArrayPlusEqualFiveElementCollection 5411 5421 +0.2% 1.00x (?)
ArrayPlusEqualSingleElementCollection 1064 1069 +0.5% 1.00x (?)
ArrayPlusEqualThreeElements 1651 1650 -0.1% 1.00x (?)
ArraySubscript 1516 1511 -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 25 25 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 28 28 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 35 35 +0.0% 1.00x
BitCount 202 202 +0.0% 1.00x
ByteSwap 101 101 +0.0% 1.00x
COWTree 5450 5346 -1.9% 1.02x (?)
CSVParsing 708566 707750 -0.1% 1.00x (?)
CSVParsingAlt 776408 776515 +0.0% 1.00x (?)
CSVParsingAltIndices 340614 340677 +0.0% 1.00x (?)
CStringLongAscii 4663 4641 -0.5% 1.00x (?)
CStringLongNonAscii 2172 2162 -0.5% 1.00x (?)
CStringShortAscii 3184 3179 -0.2% 1.00x (?)
Calculator 1150 1096 -4.7% 1.05x
CaptureProp 4100 4108 +0.2% 1.00x (?)
ChainedFilterMap 1407 1408 +0.1% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 16003 16353 +2.2% 0.98x
CharIndexing_chinese_unicodeScalars_Backwards 12124 12382 +2.1% 0.98x
CharIndexing_japanese_unicodeScalars_Backwards 19158 19578 +2.2% 0.98x
CharIndexing_korean_unicodeScalars_Backwards 15524 15855 +2.1% 0.98x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2901 2964 +2.2% 0.98x
CharIndexing_punctuated_unicodeScalars_Backwards 3632 3707 +2.1% 0.98x
CharIndexing_russian_unicodeScalars_Backwards 13339 13620 +2.1% 0.98x
CharIndexing_tweet_unicodeScalars_Backwards 31556 32259 +2.2% 0.98x
CharIndexing_utf16_unicodeScalars 22822 23202 +1.7% 0.98x
CharIndexing_utf16_unicodeScalars_Backwards 23291 23308 +0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars 22348 21600 -3.3% 1.03x
CharIteration_ascii_unicodeScalars_Backwards 15003 15097 +0.6% 0.99x (?)
CharIteration_chinese_unicodeScalars 16891 16344 -3.2% 1.03x
CharIteration_chinese_unicodeScalars_Backwards 11366 11434 +0.6% 0.99x
CharIteration_japanese_unicodeScalars 26767 25889 -3.3% 1.03x
CharIteration_japanese_unicodeScalars_Backwards 17956 18072 +0.6% 0.99x
CharIteration_korean_unicodeScalars 21662 20941 -3.3% 1.03x
CharIteration_korean_unicodeScalars_Backwards 14547 14640 +0.6% 0.99x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3966 3846 -3.0% 1.03x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2724 2728 +0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars 4984 4841 -2.9% 1.03x
CharIteration_punctuated_unicodeScalars_Backwards 3406 3414 +0.2% 1.00x (?)
CharIteration_russian_unicodeScalars 18612 17989 -3.3% 1.03x
CharIteration_russian_unicodeScalars_Backwards 12506 12577 +0.6% 0.99x (?)
CharIteration_tweet_unicodeScalars 44120 42731 -3.1% 1.03x
CharIteration_tweet_unicodeScalars_Backwards 29576 29816 +0.8% 0.99x
CharIteration_utf16_unicodeScalars 28224 27887 -1.2% 1.01x
CharIteration_utf16_unicodeScalars_Backwards 18152 18550 +2.2% 0.98x
CharacterLiteralsLarge 5842 5828 -0.2% 1.00x (?)
CharacterLiteralsSmall 217 217 +0.0% 1.00x
CharacterPropertiesFetch 4522 4501 -0.5% 1.00x (?)
CharacterPropertiesPrecomputed 1316 1317 +0.1% 1.00x (?)
CharacterPropertiesStashed 1462 1433 -2.0% 1.02x (?)
CharacterPropertiesStashedMemo 1725 1717 -0.5% 1.00x (?)
Chars 1215 1214 -0.1% 1.00x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 486 486 +0.0% 1.00x
DataAccessBytes 1223 1207 -1.3% 1.01x (?)
DataAppendArray 6231 6269 +0.6% 0.99x (?)
DataAppendBytes 5892 5929 +0.6% 0.99x (?)
DataAppendDataLargeToLarge 68450 68113 -0.5% 1.00x (?)
DataAppendDataLargeToMedium 36194 36398 +0.6% 0.99x (?)
DataAppendDataLargeToSmall 35413 35367 -0.1% 1.00x (?)
DataAppendDataMediumToLarge 38647 38898 +0.6% 0.99x (?)
DataAppendDataMediumToMedium 7529 7642 +1.5% 0.99x (?)
DataAppendDataMediumToSmall 6839 6973 +2.0% 0.98x (?)
DataAppendDataSmallToLarge 37948 37782 -0.4% 1.00x (?)
DataAppendDataSmallToMedium 7048 7189 +2.0% 0.98x (?)
DataAppendDataSmallToSmall 6897 6827 -1.0% 1.01x (?)
DataAppendSequence 19126 19487 +1.9% 0.98x (?)
DataCount 38 38 +0.0% 1.00x
DataMutateBytes 4312 4294 -0.4% 1.00x (?)
DataReplaceLarge 40566 40310 -0.6% 1.01x (?)
DataReplaceLargeBuffer 58387 58386 -0.0% 1.00x (?)
DataReplaceMedium 11178 11538 +3.2% 0.97x (?)
DataReplaceMediumBuffer 12779 12669 -0.9% 1.01x (?)
DataReplaceSmall 8801 8739 -0.7% 1.01x (?)
DataReset 3167 3198 +1.0% 0.99x (?)
DataSetCount 890 889 -0.1% 1.00x (?)
DataSubscript 236 236 +0.0% 1.00x
DictOfArraysToArrayOfDicts 832 824 -1.0% 1.01x (?)
Dictionary 754 742 -1.6% 1.02x (?)
Dictionary2 876 868 -0.9% 1.01x (?)
Dictionary2OfObjects 2407 2411 +0.2% 1.00x (?)
Dictionary3 307 307 +0.0% 1.00x
Dictionary3OfObjects 849 846 -0.4% 1.00x (?)
Dictionary4 855 856 +0.1% 1.00x (?)
Dictionary4OfObjects 994 973 -2.1% 1.02x
DictionaryBridge 1205 1217 +1.0% 0.99x (?)
DictionaryCopy 128171 128455 +0.2% 1.00x (?)
DictionaryFilter 127710 127171 -0.4% 1.00x (?)
DictionaryGroup 278 279 +0.4% 1.00x (?)
DictionaryGroupOfObjects 2346 2338 -0.3% 1.00x (?)
DictionaryLiteral 2103 2122 +0.9% 0.99x (?)
DictionaryOfObjects 2647 2625 -0.8% 1.01x (?)
DictionaryRemove 5463 5466 +0.1% 1.00x (?)
DictionaryRemoveOfObjects 29803 29689 -0.4% 1.00x (?)
DictionarySubscriptDefaultMutation 344 339 -1.5% 1.01x (?)
DictionarySubscriptDefaultMutationArray 709 704 -0.7% 1.01x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 4224 4226 +0.0% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1981 1960 -1.1% 1.01x (?)
DictionarySwap 1486 1506 +1.3% 0.99x (?)
DictionarySwapAtOfObjects 53039 53020 -0.0% 1.00x (?)
DictionarySwapOfObjects 9821 9747 -0.8% 1.01x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 84 83 -1.2% 1.01x (?)
DropFirstAnyCollectionLazy 62853 64331 +2.4% 0.98x (?)
DropFirstAnySeqCRangeIter 23774 24035 +1.1% 0.99x (?)
DropFirstAnySeqCRangeIterLazy 24508 23972 -2.2% 1.02x (?)
DropFirstAnySeqCntRange 41 41 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 41 41 +0.0% 1.00x
DropFirstAnySequence 4996 4967 -0.6% 1.01x (?)
DropFirstAnySequenceLazy 4983 4969 -0.3% 1.00x (?)
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2680 2680 +0.0% 1.00x
DropFirstSequenceLazy 2821 2774 -1.7% 1.02x (?)
DropLastAnyCollection 30 30 +0.0% 1.00x
DropLastAnyCollectionLazy 20956 21496 +2.6% 0.97x (?)
DropLastAnySeqCntRange 13 13 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 13 13 +0.0% 1.00x
DropLastCountableRangeLazy 11 11 +0.0% 1.00x
DropLastSequence 562 567 +0.9% 0.99x (?)
DropLastSequenceLazy 563 567 +0.7% 0.99x (?)
DropWhileAnyCollection 107 107 +0.0% 1.00x
DropWhileAnyCollectionLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCRangeIter 16898 17053 +0.9% 0.99x (?)
DropWhileAnySeqCRangeIterLazy 125 125 +0.0% 1.00x
DropWhileAnySeqCntRange 50 50 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 125 125 +0.0% 1.00x
DropWhileAnySequence 4930 4940 +0.2% 1.00x (?)
DropWhileAnySequenceLazy 1902 1903 +0.1% 1.00x (?)
DropWhileArrayLazy 88 88 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 105 105 +0.0% 1.00x
DropWhileSequence 2222 2222 +0.0% 1.00x
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 56 56 +0.0% 1.00x
EqualSubstringString 65 64 -1.5% 1.02x (?)
EqualSubstringSubstring 48 48 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 48 48 +0.0% 1.00x
ErrorHandling 1522 1480 -2.8% 1.03x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1290 1300 +0.8% 0.99x (?)
FilterEvenUsingReduceInto 148 146 -1.4% 1.01x (?)
FloatingPointPrinting_Double_description_small 23447 23572 +0.5% 0.99x (?)
FloatingPointPrinting_Double_description_uniform 23049 23055 +0.0% 1.00x (?)
FloatingPointPrinting_Double_interpolated 76289 76785 +0.7% 0.99x (?)
FloatingPointPrinting_Float80_description_small 30325 30741 +1.4% 0.99x (?)
FloatingPointPrinting_Float80_description_uniform 30444 29828 -2.0% 1.02x (?)
FloatingPointPrinting_Float80_interpolated 80398 79936 -0.6% 1.01x (?)
FloatingPointPrinting_Float_description_small 5219 5084 -2.6% 1.03x
FloatingPointPrinting_Float_description_uniform 5127 4960 -3.3% 1.03x
FloatingPointPrinting_Float_interpolated 52487 52410 -0.1% 1.00x (?)
FrequenciesUsingReduce 5583 5357 -4.0% 1.04x (?)
FrequenciesUsingReduceInto 1882 1853 -1.5% 1.02x (?)
HashTest 1024 1009 -1.5% 1.01x (?)
Histogram 891 894 +0.3% 1.00x (?)
IterateData 1953 1875 -4.0% 1.04x
Join 188 185 -1.6% 1.02x
LazilyFilteredArrays 65109 64991 -0.2% 1.00x (?)
LazilyFilteredRange 3870 3875 +0.1% 1.00x (?)
LessSubstringSubstring 48 48 +0.0% 1.00x
LessSubstringSubstringGenericComparable 48 48 +0.0% 1.00x
LinkedList 7537 7542 +0.1% 1.00x (?)
LuhnAlgoEager 302 295 -2.3% 1.02x (?)
LuhnAlgoLazy 301 291 -3.3% 1.03x (?)
MapReduce 395 393 -0.5% 1.01x (?)
MapReduceAnyCollection 429 429 +0.0% 1.00x
MapReduceAnyCollectionShort 2238 2234 -0.2% 1.00x (?)
MapReduceClass 2993 3010 +0.6% 0.99x (?)
MapReduceClassShort 4541 4570 +0.6% 0.99x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 446 450 +0.9% 0.99x (?)
MapReduceShort 2023 2013 -0.5% 1.00x (?)
MapReduceShortString 30 30 +0.0% 1.00x
MapReduceString 78 79 +1.3% 0.99x (?)
Memset 217 216 -0.5% 1.00x (?)
MonteCarloE 10284 10316 +0.3% 1.00x
MonteCarloPi 42692 42717 +0.1% 1.00x (?)
NSDictionaryCastToSwift 5637 5534 -1.8% 1.02x (?)
NSError 173 170 -1.7% 1.02x (?)
NSStringConversion 730 723 -1.0% 1.01x
NibbleSort 3670 3669 -0.0% 1.00x (?)
NopDeinit 31598 30160 -4.6% 1.05x
ObjectAllocation 132 132 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 24550 25481 +3.8% 0.96x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4520 4757 +5.2% 0.95x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 44422 44205 -0.5% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 42734 43489 +1.8% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 113743 113166 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 52019 52787 +1.5% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4728 4737 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 63867 63447 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSString 1225 1231 +0.5% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2670 2704 +1.3% 0.99x (?)
ObjectiveCBridgeStubDataAppend 11276 11196 -0.7% 1.01x (?)
ObjectiveCBridgeStubDateMutation 400 400 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 32795 33581 +2.4% 0.98x (?)
ObjectiveCBridgeStubFromNSDate 6280 6166 -1.8% 1.02x (?)
ObjectiveCBridgeStubFromNSString 1052 1029 -2.2% 1.02x (?)
ObjectiveCBridgeStubFromNSStringRef 161 158 -1.9% 1.02x (?)
ObjectiveCBridgeStubNSDataAppend 2588 2547 -1.6% 1.02x (?)
ObjectiveCBridgeStubNSDateMutationRef 12918 13215 +2.3% 0.98x (?)
ObjectiveCBridgeStubToArrayOfNSString 38033 37799 -0.6% 1.01x (?)
ObjectiveCBridgeStubToNSDate 14818 14579 -1.6% 1.02x (?)
ObjectiveCBridgeStubToNSDateRef 3430 3407 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSString 2372 2380 +0.3% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 118 116 -1.7% 1.02x (?)
ObjectiveCBridgeStubURLAppendPath 284025 280511 -1.2% 1.01x (?)
ObjectiveCBridgeStubURLAppendPathRef 287114 278278 -3.1% 1.03x (?)
ObjectiveCBridgeToNSArray 14023 13726 -2.1% 1.02x (?)
ObjectiveCBridgeToNSDictionary 24307 24809 +2.1% 0.98x (?)
ObjectiveCBridgeToNSSet 16136 15998 -0.9% 1.01x (?)
ObjectiveCBridgeToNSString 496 478 -3.6% 1.04x (?)
ObserverClosure 2157 2185 +1.3% 0.99x (?)
ObserverForwarderStruct 1249 1248 -0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 3728 3764 +1.0% 0.99x (?)
ObserverUnappliedMethod 2599 2593 -0.2% 1.00x (?)
OpenClose 264 264 +0.0% 1.00x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 5161 5105 -1.1% 1.01x
PointerArithmetics 31488 31491 +0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1810 1872 +3.4% 0.97x (?)
PopFrontArrayGeneric 1815 1877 +3.4% 0.97x (?)
PopFrontUnsafePointer 8657 8814 +1.8% 0.98x (?)
PrefixAnyCollection 84 83 -1.2% 1.01x
PrefixAnyCollectionLazy 62651 64459 +2.9% 0.97x (?)
PrefixAnySeqCRangeIter 18851 19037 +1.0% 0.99x (?)
PrefixAnySeqCRangeIterLazy 19016 19116 +0.5% 0.99x (?)
PrefixAnySeqCntRange 27 28 +3.7% 0.96x
PrefixAnySeqCntRangeLazy 28 28 +0.0% 1.00x
PrefixAnySequence 4337 4312 -0.6% 1.01x (?)
PrefixAnySequenceLazy 4336 4312 -0.6% 1.01x (?)
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 2222 2222 +0.0% 1.00x
PrefixSequenceLazy 2310 2315 +0.2% 1.00x (?)
PrefixWhileAnyCollection 154 154 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 90 90 +0.0% 1.00x
PrefixWhileAnySeqCRangeIterLazy 72 72 +0.0% 1.00x
PrefixWhileAnySeqCntRange 60 60 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 90 90 +0.0% 1.00x
PrefixWhileAnySequenceLazy 1392 1392 +0.0% 1.00x
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 36 36 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 359 360 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 1183 1181 -0.2% 1.00x (?)
PrimsSplit 1183 1184 +0.1% 1.00x (?)
QueueConcrete 1131 1131 +0.0% 1.00x
QueueGeneric 1130 1131 +0.1% 1.00x (?)
RC4 168 168 +0.0% 1.00x
RGBHistogram 4013 3969 -1.1% 1.01x (?)
RGBHistogramOfObjects 25503 25488 -0.1% 1.00x (?)
RangeAssignment 351 336 -4.3% 1.04x
RangeReplaceableCollectionPlusDefault 982 975 -0.7% 1.01x (?)
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 46 46 +0.0% 1.00x
RemoveWhereFilterString 347 348 +0.3% 1.00x (?)
RemoveWhereFilterStrings 432 431 -0.2% 1.00x (?)
RemoveWhereMoveInts 14 14 +0.0% 1.00x
RemoveWhereMoveStrings 701 701 +0.0% 1.00x
RemoveWhereQuadraticInts 1287 1288 +0.1% 1.00x (?)
RemoveWhereQuadraticString 497 494 -0.6% 1.01x (?)
RemoveWhereQuadraticStrings 2753 2754 +0.0% 1.00x (?)
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 848 847 -0.1% 1.00x (?)
ReversedArray 57 57 +0.0% 1.00x
ReversedBidirectional 17125 17276 +0.9% 0.99x (?)
ReversedDictionary 400 387 -3.2% 1.03x (?)
RomanNumbers 141646 138649 -2.1% 1.02x (?)
SequenceAlgosAnySequence 11883 12055 +1.4% 0.99x (?)
SequenceAlgosArray 1575 1579 +0.3% 1.00x (?)
SequenceAlgosContiguousArray 1574 1575 +0.1% 1.00x (?)
SequenceAlgosList 1350 1351 +0.1% 1.00x (?)
SequenceAlgosRange 2576 2576 +0.0% 1.00x
SequenceAlgosUnfoldSequence 1102 1102 +0.0% 1.00x
SetExclusiveOr 6714 6708 -0.1% 1.00x (?)
SetExclusiveOr_OfObjects 15081 14891 -1.3% 1.01x (?)
SetIntersect 1050 1045 -0.5% 1.00x (?)
SetIntersect_OfObjects 2559 2539 -0.8% 1.01x (?)
SetIsSubsetOf 394 394 +0.0% 1.00x
SetIsSubsetOf_OfObjects 576 570 -1.0% 1.01x
SetUnion 5681 5759 +1.4% 0.99x (?)
SetUnion_OfObjects 12733 12515 -1.7% 1.02x (?)
SevenBoom 880 865 -1.7% 1.02x (?)
Sim2DArray 417 417 +0.0% 1.00x
SortLargeExistentials 6327 6236 -1.4% 1.01x
SortLettersInPlace 1050 1053 +0.3% 1.00x (?)
SortSortedStrings 1046 1004 -4.0% 1.04x
SortStrings 2116 2041 -3.5% 1.04x
SortStringsUnicode 2634 2512 -4.6% 1.05x
StackPromo 22462 22532 +0.3% 1.00x (?)
StaticArray 9 9 +0.0% 1.00x
StrComplexWalk 1783 1783 +0.0% 1.00x
StringBuilderLong 1241 1219 -1.8% 1.02x (?)
StringBuilderWithLongSubstring 1414 1390 -1.7% 1.02x (?)
StringComparison_abnormal 793 792 -0.1% 1.00x (?)
StringComparison_ascii 1311 1258 -4.0% 1.04x
StringComparison_emoji 826 812 -1.7% 1.02x (?)
StringComparison_longSharedPrefix 944 925 -2.0% 1.02x
StringComparison_nonBMPSlowestPrenormal 1626 1606 -1.2% 1.01x (?)
StringComparison_slowerPrenormal 1750 1735 -0.9% 1.01x
StringComparison_zalgo 125419 125404 -0.0% 1.00x (?)
StringEdits 173787 171631 -1.2% 1.01x (?)
StringEnumRawValueInitialization 832 835 +0.4% 1.00x (?)
StringEqualPointerComparison 286 295 +3.1% 0.97x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 22 +4.8% 0.95x
StringHasPrefixUnicode 111146 108255 -2.6% 1.03x (?)
StringHasSuffixUnicode 116402 113339 -2.6% 1.03x (?)
StringInterpolation 9984 9870 -1.1% 1.01x (?)
StringInterpolationManySmallSegments 19289 18492 -4.1% 1.04x (?)
StringInterpolationSmall 6754 6494 -3.8% 1.04x (?)
StringRemoveDupes 814 822 +1.0% 0.99x (?)
StringUTF16Builder 2813 2725 -3.1% 1.03x (?)
StringWalk 1437 1421 -1.1% 1.01x (?)
StringWithCString 40848 41324 +1.2% 0.99x
StringWordBuilderReservingCapacity 2031 1990 -2.0% 1.02x
SubstringComparable 26 26 +0.0% 1.00x
SubstringEqualString 779 777 -0.3% 1.00x (?)
SubstringEquatable 1425 1431 +0.4% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 75 75 +0.0% 1.00x
SuffixAnyCollection 31 31 +0.0% 1.00x
SuffixAnyCollectionLazy 20921 21502 +2.8% 0.97x (?)
SuffixAnySeqCntRange 20 20 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 20 20 +0.0% 1.00x
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 11 11 +0.0% 1.00x
SumUsingReduce 101 97 -4.0% 1.04x
SumUsingReduceInto 97 102 +5.2% 0.95x
SuperChars 14554 14628 +0.5% 0.99x (?)
TwoSum 1758 1753 -0.3% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 291 294 +1.0% 0.99x (?)
Walsh 403 405 +0.5% 1.00x (?)
WordCountHistogramASCII 8505 8119 -4.5% 1.05x (?)
WordCountHistogramUTF16 15011 14766 -1.6% 1.02x (?)
WordCountUniqueASCII 2594 2579 -0.6% 1.01x (?)
WordCountUniqueUTF16 8193 8309 +1.4% 0.99x (?)
WordSplitASCII 8278 8384 +1.3% 0.99x (?)
WordSplitUTF16 10540 10533 -0.1% 1.00x (?)
XorLoop 395 397 +0.5% 0.99x (?)

Unoptimized (Onone)

Regression (99)
TEST OLD NEW DELTA SPEEDUP
Chars 35867 50286 +40.2% 0.71x
SequenceAlgosArray 758688 1030712 +35.9% 0.74x
DropWhileArrayLazy 13980 18963 +35.6% 0.74x
SumUsingReduceInto 154200 208830 +35.4% 0.74x
ArrayAppendLazyMap 168483 226010 +34.1% 0.75x
StringComparison_ascii 9434 12654 +34.1% 0.75x (?)
LazilyFilteredArrayContains 753695 996903 +32.3% 0.76x
MapReduceLazyCollection 22774 29853 +31.1% 0.76x
UTF8Decode 30727 40274 +31.1% 0.76x
StringComparison_fastPrenormal 4933 6463 +31.0% 0.76x (?)
SumUsingReduce 164003 214850 +31.0% 0.76x (?)
PrefixWhileArrayLazy 12435 16250 +30.7% 0.77x
StringComparison_latin1 3851 5017 +30.3% 0.77x
SuperChars 86203 111257 +29.1% 0.77x (?)
FilterEvenUsingReduceInto 1896 2437 +28.5% 0.78x
RemoveWhereFilterInts 1934 2474 +27.9% 0.78x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 44149 56235 +27.4% 0.79x
CharIteration_tweet_unicodeScalars 292570 371294 +26.9% 0.79x (?)
Join 783 993 +26.8% 0.79x
ReversedDictionary 23507 29749 +26.6% 0.79x
SubstringComparable 1640 2069 +26.2% 0.79x
CharIteration_korean_unicodeScalars 144274 181922 +26.1% 0.79x (?)
ChainedFilterMap 231932 292176 +26.0% 0.79x
CharIteration_japanese_unicodeScalars 178429 224684 +25.9% 0.79x (?)
CharIteration_punctuatedJapanese_unicodeScalars 26345 33076 +25.5% 0.80x (?)
CharIteration_chinese_unicodeScalars 112853 141613 +25.5% 0.80x (?)
CharIteration_ascii_unicodeScalars 149236 187180 +25.4% 0.80x
CharIteration_punctuated_unicodeScalars 33353 41799 +25.3% 0.80x
CharIteration_russian_unicodeScalars 124282 155123 +24.8% 0.80x (?)
SubstringEquatable 5385 6623 +23.0% 0.81x
ArrayValueProp2 15203 18667 +22.8% 0.81x
StringComparison_longSharedPrefix 2365 2899 +22.6% 0.82x
StringComparison_slowerPrenormal 4164 5078 +22.0% 0.82x (?)
CharIteration_ascii_unicodeScalars_Backwards 252742 307767 +21.8% 0.82x
StringComparison_emoji 1979 2408 +21.7% 0.82x
WordCountUniqueASCII 7440 9045 +21.6% 0.82x
RemoveWhereFilterStrings 2451 2979 +21.5% 0.82x
MapReduceAnyCollection 25417 30760 +21.0% 0.83x
CharIteration_chinese_unicodeScalars_Backwards 191272 231000 +20.8% 0.83x (?)
StringComparison_nonBMPSlowestPrenormal 3684 4442 +20.6% 0.83x
ObjectiveCBridgeStubFromNSDate 6967 8388 +20.4% 0.83x (?)
MapReduce 25695 30920 +20.3% 0.83x
CharIteration_russian_unicodeScalars_Backwards 211059 253649 +20.2% 0.83x (?)
MapReduceLazyCollectionShort 34807 41787 +20.1% 0.83x
CharIteration_korean_unicodeScalars_Backwards 244848 293702 +20.0% 0.83x
RemoveWhereFilterString 1304 1559 +19.6% 0.84x
FilterEvenUsingReduce 3554 4248 +19.5% 0.84x
CharIteration_tweet_unicodeScalars_Backwards 504507 602545 +19.4% 0.84x (?)
StringBuilder 5859 6983 +19.2% 0.84x (?)
CharIteration_punctuated_unicodeScalars_Backwards 56099 66715 +18.9% 0.84x (?)
MapReduceString 1780 2115 +18.8% 0.84x
CharIteration_japanese_unicodeScalars_Backwards 306599 363225 +18.5% 0.84x (?)
CharIteration_utf16_unicodeScalars 127600 150037 +17.6% 0.85x
MapReduceClass 29618 34759 +17.4% 0.85x
LazilyFilteredArrays 1415890 1653562 +16.8% 0.86x (?)
MapReduceShort 36728 42689 +16.2% 0.86x
MapReduceSequence 30918 35900 +16.1% 0.86x
CharIteration_utf16_unicodeScalars_Backwards 220706 256087 +16.0% 0.86x (?)
Dictionary 2330 2703 +16.0% 0.86x
PrefixWhileAnySeqCRangeIter 34290 39448 +15.0% 0.87x
MapReduceClassShort 40235 45992 +14.3% 0.87x
DataReplaceMediumBuffer 12524 14176 +13.2% 0.88x (?)
ObserverForwarderStruct 4305 4871 +13.1% 0.88x (?)
SubstringEqualString 1688 1909 +13.1% 0.88x
MapReduceAnyCollectionShort 37271 42098 +13.0% 0.89x
ObjectAllocation 1255 1414 +12.7% 0.89x (?)
StringUTF16Builder 8440 9499 +12.5% 0.89x (?)
ErrorHandling 6419 7224 +12.5% 0.89x
Histogram 6487 7296 +12.5% 0.89x (?)
RemoveWhereQuadraticString 2260 2541 +12.4% 0.89x (?)
PrefixWhileSequence 26334 29597 +12.4% 0.89x
MapReduceShortString 229 256 +11.8% 0.89x (?)
PrefixWhileAnySequence 26787 29896 +11.6% 0.90x
ObjectiveCBridgeFromNSSetAnyObjectForced 5607 6254 +11.5% 0.90x (?)
StringComparison_abnormal 1364 1521 +11.5% 0.90x (?)
AngryPhonebook 5442 6062 +11.4% 0.90x (?)
FloatingPointPrinting_Float_interpolated 68751 75963 +10.5% 0.91x (?)
CharIndexing_korean_unicodeScalars_Backwards 391548 432286 +10.4% 0.91x (?)
StringUTF16SubstringBuilder 22642 24892 +9.9% 0.91x
WordCountUniqueUTF16 13633 14984 +9.9% 0.91x (?)
SuffixAnySeqCRangeIter 38256 41880 +9.5% 0.91x
ObserverClosure 6430 7026 +9.3% 0.92x (?)
SuffixAnySeqCRangeIterLazy 38458 41861 +8.8% 0.92x
DropLastAnySeqCRangeIter 41550 45192 +8.8% 0.92x
DropLastAnySeqCRangeIterLazy 41765 45336 +8.6% 0.92x (?)
ObserverPartiallyAppliedMethod 7973 8637 +8.3% 0.92x
DictionaryGroup 4535 4907 +8.2% 0.92x
ObserverUnappliedMethod 8105 8700 +7.3% 0.93x
QueueConcrete 14293 15298 +7.0% 0.93x
QueueGeneric 18656 19948 +6.9% 0.94x
FloatingPointPrinting_Float80_description_uniform 58904 62610 +6.3% 0.94x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 9362 9946 +6.2% 0.94x (?)
CharIndexing_chinese_unicodeScalars 279643 296502 +6.0% 0.94x
PrefixAnySeqCRangeIterLazy 20640 21865 +5.9% 0.94x (?)
CharIndexing_tweet_unicodeScalars 736384 777791 +5.6% 0.95x (?)
LuhnAlgoLazy 5588 5900 +5.6% 0.95x (?)
DictionaryGroupOfObjects 7708 8136 +5.6% 0.95x (?)
PrefixAnySeqCRangeIter 20751 21864 +5.4% 0.95x (?)
DataAppendDataMediumToMedium 6760 7117 +5.3% 0.95x
Improvement (12)
TEST OLD NEW DELTA SPEEDUP
PrefixArrayLazy 37089 33142 -10.6% 1.12x
TypeFlood 214 194 -9.3% 1.10x (?)
ArrayOfGenericPOD2 1243 1129 -9.2% 1.10x
StringWithCString 45734 41603 -9.0% 1.10x
DropFirstArrayLazy 35709 32967 -7.7% 1.08x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 78285 72761 -7.1% 1.08x (?)
CharacterLiteralsSmall 730 681 -6.7% 1.07x
RecursiveOwnedParameter 6331 5916 -6.6% 1.07x
StringBuilderWithLongSubstring 5189 4900 -5.6% 1.06x (?)
StringAdder 1154 1090 -5.5% 1.06x
ObjectiveCBridgeStubNSDateMutationRef 15847 14974 -5.5% 1.06x (?)
DictionarySubscriptDefaultMutationOfObjects 5664 5391 -4.8% 1.05x (?)
No Changes (311)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 101951 101339 -0.6% 1.01x (?)
Array2D 661208 661851 +0.1% 1.00x (?)
ArrayAppend 4667 4671 +0.1% 1.00x (?)
ArrayAppendArrayOfInt 865 862 -0.3% 1.00x (?)
ArrayAppendAscii 39067 38821 -0.6% 1.01x (?)
ArrayAppendFromGeneric 869 874 +0.6% 0.99x (?)
ArrayAppendGenericStructs 1504 1507 +0.2% 1.00x (?)
ArrayAppendLatin1 64643 64255 -0.6% 1.01x
ArrayAppendOptionals 1474 1502 +1.9% 0.98x (?)
ArrayAppendRepeatCol 221626 224112 +1.1% 0.99x
ArrayAppendReserved 4279 4281 +0.0% 1.00x (?)
ArrayAppendSequence 103587 102971 -0.6% 1.01x
ArrayAppendStrings 6370 6370 +0.0% 1.00x
ArrayAppendToFromGeneric 869 867 -0.2% 1.00x (?)
ArrayAppendToGeneric 873 864 -1.0% 1.01x (?)
ArrayAppendUTF16 63927 63762 -0.3% 1.00x (?)
ArrayInClass 6294 6219 -1.2% 1.01x (?)
ArrayLiteral 1801 1799 -0.1% 1.00x (?)
ArrayOfGenericRef 10763 10680 -0.8% 1.01x
ArrayOfPOD 845 845 +0.0% 1.00x
ArrayOfRef 9957 9950 -0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 869 867 -0.2% 1.00x (?)
ArrayPlusEqualFiveElementCollection 237325 233304 -1.7% 1.02x (?)
ArrayPlusEqualSingleElementCollection 235065 231104 -1.7% 1.02x (?)
ArrayPlusEqualThreeElements 9342 9409 +0.7% 0.99x (?)
ArraySubscript 109107 106301 -2.6% 1.03x
ArrayValueProp 3661 3667 +0.2% 1.00x (?)
ArrayValueProp3 4151 4160 +0.2% 1.00x (?)
ArrayValueProp4 4138 4113 -0.6% 1.01x (?)
BinaryFloatingPointPropertiesBinade 91 91 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 131 131 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 134 134 +0.0% 1.00x
BitCount 8889 8887 -0.0% 1.00x (?)
ByteSwap 9637 9616 -0.2% 1.00x (?)
COWTree 11710 12118 +3.5% 0.97x (?)
CSVParsing 2878269 2880908 +0.1% 1.00x (?)
CSVParsingAlt 1444735 1411576 -2.3% 1.02x (?)
CSVParsingAltIndices 2353307 2360417 +0.3% 1.00x (?)
CStringLongAscii 5542 5582 +0.7% 0.99x
CStringLongNonAscii 2446 2457 +0.4% 1.00x (?)
CStringShortAscii 6699 6765 +1.0% 0.99x (?)
Calculator 2100 2079 -1.0% 1.01x
CaptureProp 279450 282280 +1.0% 0.99x
CharIndexing_ascii_unicodeScalars 372707 385787 +3.5% 0.97x (?)
CharIndexing_ascii_unicodeScalars_Backwards 405488 420250 +3.6% 0.96x (?)
CharIndexing_chinese_unicodeScalars_Backwards 309574 320528 +3.5% 0.97x (?)
CharIndexing_japanese_unicodeScalars 440152 458687 +4.2% 0.96x
CharIndexing_japanese_unicodeScalars_Backwards 508995 514410 +1.1% 0.99x (?)
CharIndexing_korean_unicodeScalars 358040 372926 +4.2% 0.96x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 64962 68032 +4.7% 0.95x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 73134 74332 +1.6% 0.98x (?)
CharIndexing_punctuated_unicodeScalars 82009 85092 +3.8% 0.96x
CharIndexing_punctuated_unicodeScalars_Backwards 97470 99553 +2.1% 0.98x (?)
CharIndexing_russian_unicodeScalars 312801 319966 +2.3% 0.98x (?)
CharIndexing_russian_unicodeScalars_Backwards 343964 354451 +3.0% 0.97x (?)
CharIndexing_tweet_unicodeScalars_Backwards 820007 835024 +1.8% 0.98x (?)
CharIndexing_utf16_unicodeScalars 316686 322236 +1.8% 0.98x (?)
CharIndexing_utf16_unicodeScalars_Backwards 350428 340805 -2.7% 1.03x (?)
CharacterLiteralsLarge 5813 5773 -0.7% 1.01x (?)
CharacterPropertiesFetch 5593 5613 +0.4% 1.00x (?)
CharacterPropertiesPrecomputed 3707 3792 +2.3% 0.98x (?)
CharacterPropertiesStashed 2353 2313 -1.7% 1.02x (?)
CharacterPropertiesStashedMemo 4474 4492 +0.4% 1.00x (?)
ClassArrayGetter 986 986 +0.0% 1.00x
Combos 2383 2413 +1.3% 0.99x (?)
DataAccessBytes 2415 2410 -0.2% 1.00x (?)
DataAppendArray 5461 5484 +0.4% 1.00x (?)
DataAppendBytes 5281 5536 +4.8% 0.95x (?)
DataAppendDataLargeToLarge 68079 67601 -0.7% 1.01x (?)
DataAppendDataLargeToMedium 34865 35098 +0.7% 0.99x (?)
DataAppendDataLargeToSmall 34484 34310 -0.5% 1.01x (?)
DataAppendDataMediumToLarge 37719 37709 -0.0% 1.00x (?)
DataAppendDataMediumToSmall 5923 6090 +2.8% 0.97x (?)
DataAppendDataSmallToLarge 36675 36998 +0.9% 0.99x (?)
DataAppendDataSmallToMedium 6133 6076 -0.9% 1.01x (?)
DataAppendDataSmallToSmall 6083 5840 -4.0% 1.04x (?)
DataAppendSequence 2311155 2340293 +1.3% 0.99x (?)
DataCopyBytes 2481 2523 +1.7% 0.98x (?)
DataCount 223 223 +0.0% 1.00x
DataMutateBytes 5255 5192 -1.2% 1.01x (?)
DataReplaceLarge 39934 40246 +0.8% 0.99x (?)
DataReplaceLargeBuffer 59916 59458 -0.8% 1.01x (?)
DataReplaceMedium 9277 9054 -2.4% 1.02x (?)
DataReplaceSmall 6905 7136 +3.3% 0.97x (?)
DataReplaceSmallBuffer 10515 10958 +4.2% 0.96x (?)
DataReset 2954 2900 -1.8% 1.02x (?)
DataSetCount 578 564 -2.4% 1.02x (?)
DataSubscript 443 443 +0.0% 1.00x
DictOfArraysToArrayOfDicts 3594 3647 +1.5% 0.99x
Dictionary2 1508 1507 -0.1% 1.00x (?)
Dictionary2OfObjects 4706 4526 -3.8% 1.04x (?)
Dictionary3 894 902 +0.9% 0.99x (?)
Dictionary3OfObjects 2247 2313 +2.9% 0.97x (?)
Dictionary4 1625 1614 -0.7% 1.01x (?)
Dictionary4OfObjects 2233 2222 -0.5% 1.00x (?)
DictionaryBridge 1359 1372 +1.0% 0.99x (?)
DictionaryCopy 333267 329200 -1.2% 1.01x (?)
DictionaryFilter 340463 340753 +0.1% 1.00x (?)
DictionaryLiteral 8900 8878 -0.2% 1.00x (?)
DictionaryOfObjects 6473 6276 -3.0% 1.03x (?)
DictionaryRemove 18251 18272 +0.1% 1.00x (?)
DictionaryRemoveOfObjects 55235 54841 -0.7% 1.01x (?)
DictionarySubscriptDefaultMutation 2037 2062 +1.2% 0.99x (?)
DictionarySubscriptDefaultMutationArray 2325 2328 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9729 9664 -0.7% 1.01x (?)
DictionarySwap 5321 5363 +0.8% 0.99x (?)
DictionarySwapAt 35895 35522 -1.0% 1.01x (?)
DictionarySwapAtOfObjects 114234 114722 +0.4% 1.00x (?)
DictionarySwapOfObjects 19860 19611 -1.3% 1.01x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 15438 15633 +1.3% 0.99x
DropFirstAnyCollectionLazy 107782 110246 +2.3% 0.98x (?)
DropFirstAnySeqCRangeIter 25377 25633 +1.0% 0.99x
DropFirstAnySeqCRangeIterLazy 25397 25670 +1.1% 0.99x
DropFirstAnySeqCntRange 15475 15652 +1.1% 0.99x
DropFirstAnySeqCntRangeLazy 15518 15633 +0.7% 0.99x (?)
DropFirstAnySequence 13145 13041 -0.8% 1.01x (?)
DropFirstAnySequenceLazy 13081 13260 +1.4% 0.99x (?)
DropFirstArray 3423 3380 -1.3% 1.01x (?)
DropFirstCountableRange 323 323 +0.0% 1.00x
DropFirstCountableRangeLazy 33653 34148 +1.5% 0.99x (?)
DropFirstSequence 12710 12869 +1.3% 0.99x
DropFirstSequenceLazy 12868 12827 -0.3% 1.00x (?)
DropLastAnyCollection 5161 5238 +1.5% 0.99x
DropLastAnyCollectionLazy 35995 36611 +1.7% 0.98x (?)
DropLastAnySeqCntRange 5219 5261 +0.8% 0.99x (?)
DropLastAnySeqCntRangeLazy 5172 5223 +1.0% 0.99x (?)
DropLastAnySequence 30848 32014 +3.8% 0.96x
DropLastAnySequenceLazy 30562 31633 +3.5% 0.97x
DropLastCountableRange 112 112 +0.0% 1.00x
DropLastCountableRangeLazy 11293 11426 +1.2% 0.99x (?)
DropLastSequence 30455 31740 +4.2% 0.96x
DropLastSequenceLazy 30710 31751 +3.4% 0.97x
DropWhileAnyCollection 19929 20249 +1.6% 0.98x
DropWhileAnyCollectionLazy 22274 22490 +1.0% 0.99x
DropWhileAnySeqCRangeIter 25163 25527 +1.4% 0.99x
DropWhileAnySeqCRangeIterLazy 22211 22450 +1.1% 0.99x (?)
DropWhileAnySeqCntRange 19878 20196 +1.6% 0.98x
DropWhileAnySeqCntRangeLazy 22252 22460 +0.9% 0.99x
DropWhileAnySequence 13831 13822 -0.1% 1.00x (?)
DropWhileAnySequenceLazy 13108 13048 -0.5% 1.00x
DropWhileCountableRange 4805 4879 +1.5% 0.98x
DropWhileCountableRangeLazy 21823 22066 +1.1% 0.99x
DropWhileSequence 13360 13534 +1.3% 0.99x
DropWhileSequenceLazy 12235 12481 +2.0% 0.98x (?)
EqualStringSubstring 72 72 +0.0% 1.00x
EqualSubstringString 72 72 +0.0% 1.00x
EqualSubstringSubstring 73 72 -1.4% 1.01x
EqualSubstringSubstringGenericEquatable 59 59 +0.0% 1.00x
ExclusivityGlobal 197 188 -4.6% 1.05x
ExclusivityIndependent 72 71 -1.4% 1.01x
FatCompactMap 370988 366030 -1.3% 1.01x (?)
FloatingPointPrinting_Double_description_small 24799 24727 -0.3% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 36648 36271 -1.0% 1.01x (?)
FloatingPointPrinting_Double_interpolated 93657 94652 +1.1% 0.99x (?)
FloatingPointPrinting_Float80_description_small 31748 31678 -0.2% 1.00x (?)
FloatingPointPrinting_Float80_interpolated 118766 116611 -1.8% 1.02x (?)
FloatingPointPrinting_Float_description_small 6830 6722 -1.6% 1.02x
FloatingPointPrinting_Float_description_uniform 17563 17330 -1.3% 1.01x
FrequenciesUsingReduce 12019 11768 -2.1% 1.02x (?)
FrequenciesUsingReduceInto 3918 3931 +0.3% 1.00x (?)
Hanoi 20405 20190 -1.1% 1.01x (?)
HashTest 21148 21675 +2.5% 0.98x (?)
Integrate 459 458 -0.2% 1.00x
IterateData 5434 5451 +0.3% 1.00x (?)
LazilyFilteredRange 530220 538473 +1.6% 0.98x
LessSubstringSubstring 73 73 +0.0% 1.00x
LessSubstringSubstringGenericComparable 58 58 +0.0% 1.00x
LinkedList 32289 32280 -0.0% 1.00x (?)
LuhnAlgoEager 5467 5496 +0.5% 0.99x (?)
MapReduceLazySequence 20525 20474 -0.2% 1.00x
Memset 44143 44120 -0.1% 1.00x (?)
MonteCarloE 1159824 1142595 -1.5% 1.02x (?)
MonteCarloPi 5260654 5127748 -2.5% 1.03x
NSDictionaryCastToSwift 6780 6647 -2.0% 1.02x (?)
NSError 608 615 +1.2% 0.99x (?)
NSStringConversion 773 769 -0.5% 1.01x
NibbleSort 505188 509376 +0.8% 0.99x
NopDeinit 199251 193312 -3.0% 1.03x
ObjectiveCBridgeFromNSArrayAnyObject 28517 28342 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 48846 48553 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 46108 46578 +1.0% 0.99x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 120242 117436 -2.3% 1.02x (?)
ObjectiveCBridgeFromNSSetAnyObject 56527 57354 +1.5% 0.99x (?)
ObjectiveCBridgeFromNSString 2843 2892 +1.7% 0.98x (?)
ObjectiveCBridgeFromNSStringForced 2789 2819 +1.1% 0.99x (?)
ObjectiveCBridgeStubDataAppend 6486 6294 -3.0% 1.03x (?)
ObjectiveCBridgeStubDateMutation 773 745 -3.6% 1.04x
ObjectiveCBridgeStubFromArrayOfNSString 33943 33770 -0.5% 1.01x (?)
ObjectiveCBridgeStubFromNSString 1092 1069 -2.1% 1.02x (?)
ObjectiveCBridgeStubFromNSStringRef 196 196 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 3117 2972 -4.7% 1.05x (?)
ObjectiveCBridgeStubToArrayOfNSString 38351 38139 -0.6% 1.01x (?)
ObjectiveCBridgeStubToNSDate 15665 16165 +3.2% 0.97x (?)
ObjectiveCBridgeStubToNSDateRef 3483 3451 -0.9% 1.01x (?)
ObjectiveCBridgeStubToNSString 2405 2406 +0.0% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 159 156 -1.9% 1.02x (?)
ObjectiveCBridgeStubURLAppendPath 303229 298027 -1.7% 1.02x (?)
ObjectiveCBridgeStubURLAppendPathRef 303449 298105 -1.8% 1.02x (?)
ObjectiveCBridgeToNSArray 14227 14212 -0.1% 1.00x (?)
ObjectiveCBridgeToNSDictionary 26019 25120 -3.5% 1.04x (?)
ObjectiveCBridgeToNSSet 16911 17074 +1.0% 0.99x (?)
ObjectiveCBridgeToNSString 534 544 +1.9% 0.98x (?)
OpenClose 884 872 -1.4% 1.01x
PartialApplyDynamicType 39513 40038 +1.3% 0.99x (?)
Phonebook 19287 18734 -2.9% 1.03x (?)
PointerArithmetics 120242 120217 -0.0% 1.00x (?)
PolymorphicCalls 2418 2423 +0.2% 1.00x (?)
PopFrontArray 4637 4645 +0.2% 1.00x (?)
PopFrontArrayGeneric 5437 5388 -0.9% 1.01x (?)
PopFrontUnsafePointer 10608 10667 +0.6% 0.99x (?)
PrefixAnyCollection 15449 15624 +1.1% 0.99x (?)
PrefixAnyCollectionLazy 106796 108691 +1.8% 0.98x (?)
PrefixAnySeqCntRange 15467 15665 +1.3% 0.99x (?)
PrefixAnySeqCntRangeLazy 15495 15680 +1.2% 0.99x (?)
PrefixAnySequence 10675 10727 +0.5% 1.00x (?)
PrefixAnySequenceLazy 10608 10758 +1.4% 0.99x (?)
PrefixArray 3347 3347 +0.0% 1.00x
PrefixCountableRange 323 323 +0.0% 1.00x
PrefixCountableRangeLazy 33621 34139 +1.5% 0.98x (?)
PrefixSequence 10230 10225 -0.0% 1.00x (?)
PrefixSequenceLazy 10290 10196 -0.9% 1.01x (?)
PrefixWhileAnyCollection 28712 29255 +1.9% 0.98x
PrefixWhileAnyCollectionLazy 18409 18613 +1.1% 0.99x (?)
PrefixWhileAnySeqCRangeIterLazy 18227 18498 +1.5% 0.99x
PrefixWhileAnySeqCntRange 28673 29223 +1.9% 0.98x (?)
PrefixWhileAnySeqCntRangeLazy 18255 18518 +1.4% 0.99x
PrefixWhileAnySequenceLazy 11250 11252 +0.0% 1.00x (?)
PrefixWhileArray 10502 10470 -0.3% 1.00x
PrefixWhileCountableRange 13610 13945 +2.5% 0.98x (?)
PrefixWhileCountableRangeLazy 17960 18229 +1.5% 0.99x (?)
PrefixWhileSequenceLazy 11028 10935 -0.8% 1.01x
Prims 10003 9993 -0.1% 1.00x (?)
PrimsSplit 9866 10052 +1.9% 0.98x (?)
RC4 16504 16400 -0.6% 1.01x (?)
RGBHistogram 25294 26446 +4.6% 0.96x
RGBHistogramOfObjects 79638 79721 +0.1% 1.00x (?)
RangeAssignment 2658 2739 +3.0% 0.97x
RangeIterationSigned 15055 14403 -4.3% 1.05x
RangeReplaceableCollectionPlusDefault 11919 12191 +2.3% 0.98x (?)
RemoveWhereMoveInts 3389 3388 -0.0% 1.00x (?)
RemoveWhereMoveStrings 3890 3897 +0.2% 1.00x (?)
RemoveWhereQuadraticInts 8053 8453 +5.0% 0.95x
RemoveWhereQuadraticStrings 9721 10122 +4.1% 0.96x
RemoveWhereSwapInts 6092 6366 +4.5% 0.96x
RemoveWhereSwapStrings 6805 7055 +3.7% 0.96x
ReversedArray 13136 13068 -0.5% 1.01x (?)
ReversedBidirectional 43523 43456 -0.2% 1.00x (?)
RomanNumbers 1330188 1383443 +4.0% 0.96x (?)
SequenceAlgosAnySequence 12872 13065 +1.5% 0.99x (?)
SequenceAlgosContiguousArray 286339 285396 -0.3% 1.00x (?)
SequenceAlgosList 8650 8625 -0.3% 1.00x (?)
SequenceAlgosRange 1267516 1283450 +1.3% 0.99x
SequenceAlgosUnfoldSequence 6536 6597 +0.9% 0.99x (?)
SetExclusiveOr 17392 17346 -0.3% 1.00x (?)
SetExclusiveOr_OfObjects 46370 45901 -1.0% 1.01x (?)
SetIntersect 6944 6976 +0.5% 1.00x (?)
SetIntersect_OfObjects 10918 10932 +0.1% 1.00x (?)
SetIsSubsetOf 1220 1225 +0.4% 1.00x (?)
SetIsSubsetOf_OfObjects 1767 1746 -1.2% 1.01x (?)
SetUnion 12489 12467 -0.2% 1.00x (?)
SetUnion_OfObjects 32460 32291 -0.5% 1.01x (?)
SevenBoom 1087 1087 +0.0% 1.00x
Sim2DArray 43411 43463 +0.1% 1.00x (?)
SortLargeExistentials 11645 11652 +0.1% 1.00x (?)
SortLettersInPlace 1974 1981 +0.4% 1.00x (?)
SortSortedStrings 1198 1148 -4.2% 1.04x
SortStrings 2407 2350 -2.4% 1.02x
SortStringsUnicode 2996 2930 -2.2% 1.02x
StackPromo 106968 105419 -1.4% 1.01x (?)
StaticArray 2548 2523 -1.0% 1.01x (?)
StrComplexWalk 6612 6609 -0.0% 1.00x (?)
StrToInt 88674 86847 -2.1% 1.02x (?)
StringBuilderLong 2944 2945 +0.0% 1.00x (?)
StringComparison_zalgo 128496 128442 -0.0% 1.00x (?)
StringEdits 390613 400431 +2.5% 0.98x (?)
StringEnumRawValueInitialization 33335 32574 -2.3% 1.02x
StringEqualPointerComparison 1591 1591 +0.0% 1.00x
StringFromLongWholeSubstring 12 12 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 197 196 -0.5% 1.01x (?)
StringHasPrefixAscii 3149 3092 -1.8% 1.02x
StringHasPrefixUnicode 106281 105228 -1.0% 1.01x (?)
StringHasSuffixAscii 3296 3277 -0.6% 1.01x
StringHasSuffixUnicode 107644 106130 -1.4% 1.01x
StringInterpolation 11479 11584 +0.9% 0.99x (?)
StringInterpolationManySmallSegments 20791 20076 -3.4% 1.04x (?)
StringInterpolationSmall 8736 8970 +2.7% 0.97x (?)
StringMatch 40576 40447 -0.3% 1.00x (?)
StringRemoveDupes 787 808 +2.7% 0.97x
StringWalk 13311 12740 -4.3% 1.04x
StringWordBuilder 2497 2494 -0.1% 1.00x (?)
StringWordBuilderReservingCapacity 2166 2153 -0.6% 1.01x
SubstringFromLongString 18 18 +0.0% 1.00x
SubstringFromLongStringGeneric 108 107 -0.9% 1.01x
SuffixAnyCollection 5176 5226 +1.0% 0.99x (?)
SuffixAnyCollectionLazy 36522 37382 +2.4% 0.98x (?)
SuffixAnySeqCntRange 5207 5243 +0.7% 0.99x (?)
SuffixAnySeqCntRangeLazy 5176 5250 +1.4% 0.99x (?)
SuffixAnySequence 26461 27628 +4.4% 0.96x
SuffixAnySequenceLazy 26327 27343 +3.9% 0.96x
SuffixCountableRange 111 112 +0.9% 0.99x (?)
SuffixCountableRangeLazy 11236 11398 +1.4% 0.99x (?)
SuffixSequence 26374 27171 +3.0% 0.97x
SuffixSequenceLazy 26304 27378 +4.1% 0.96x
TwoSum 3808 3809 +0.0% 1.00x (?)
Walsh 11915 11911 -0.0% 1.00x (?)
WordCountHistogramASCII 38182 40044 +4.9% 0.95x
WordCountHistogramUTF16 47190 48312 +2.4% 0.98x
WordSplitASCII 12186 11756 -3.5% 1.04x (?)
WordSplitUTF16 14340 14600 +1.8% 0.98x (?)
XorLoop 23236 23221 -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

@jrose-apple
Copy link
Contributor Author

jrose-apple commented Apr 20, 2018

I'm pretty sure these benchmark results are nonsense. None of these things even touch FloatingPointSign, so unless these three functions changed the code size of the standard library so drastically this is just random noise. Why do we have benchmarks with a ±30% swing anyway? *grump*

(I was looking for changes in BinaryFloatingPointProperties, but it turns out those are so fast already that you can't tell.)

@stephentyrone
Copy link
Contributor

Yeah, there's something deeply suspicious about those benchmark regressions.

@eeckstein
Copy link
Contributor

That's in fact interesting. Usually the noise is within 10%

@jrose-apple jrose-apple merged commit f6b67f3 into swiftlang:master Apr 20, 2018
@jrose-apple jrose-apple deleted the give-me-a-sign branch April 20, 2018 22:28
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Apr 21, 2018
…ftlang#16043)

The compiler can synthesize these, but it doesn't mark them
@inlinable, since in the general case they're just a "default"
implementation and not "the only implementation forever". But for a
two-element enum that's based on a part of IEEE 754, it's probably
safe to assume this is the only implementation forever, and that
can be important for performance.

https://bugs.swift.org/browse/SR-7094
(cherry picked from commit f6b67f3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants