Skip to content

Handle unexpected raw values for @objc enums in derived conformances #17836

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
Jul 11, 2018

Conversation

jrose-apple
Copy link
Contributor

Because people put all sorts of nonsense into @objc enums (most reasonably, "private cases", which represent valid values that are not API), the Swift-synthesized implementation of hash(into:) needs to not expect a switch statement to be exhaustive. And since Swift-defined @objc enums are supposed to behave enough like C-defined enums, they should at least handle simple method calls with an invalid raw value, which means that rawValue likewise should not use a switch.

This patch provides alternate implementations that look like this:

extension ImportedEnum {
  public var rawValue: Int {
    return unsafeBitCast(self, to: Int.self)
  }

  public func hash(into hasher: inout Hasher) {
    hasher.combine(self.rawValue)
  }
}

rdar://problem/41913284

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

@swift-ci Please benchmark

@jrose-apple
Copy link
Contributor Author

cc @allevato

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@swift-ci
Copy link
Contributor

swift-ci commented Jul 9, 2018

Build failed
Swift Test Linux Platform
Git Sha - ba964d7392f38f053b154325b970a8ef60875ae8


public enum E: Int {
case a, b, c
}

// CHECK-DAG: sil [serialized] @$S22enum_raw_representable1EO0B5ValueACSgSi_tcfC
// CHECK-DAG: sil [serialized] @$S22enum_raw_representable1EO0B5ValueSivg
@objc public enum CLike: Int {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer this was in its own file, like objc_enum_raw_representable.swift

@slavapestov
Copy link
Contributor

This should be a small code size win too!

@@ -90,6 +90,27 @@ static void deriveBodyRawRepresentable_raw(AbstractFunctionDecl *toRawDecl) {
}
#endif

if (enumDecl->isObjC()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good optimization but isn't safe to perform on types which override rawValue for some reason, right?

@objc enum Foo : Int {
    case a
    
    var rawValue: Int {
        return 5
    }
}

let a = Foo.a
print(a.rawValue) // 5
print(unsafeBitCast(a, to: Int.self)) // 0

We should probably see if rawValue was synthesized, and if so, bypass calling it with this, yeah?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the derived implementation of rawValue; it'll only be used if the user didn't write one.

(If you're talking about the hash(into:) change, I suppose you're right, but we're doomed either way in that case.)

Copy link
Contributor

@itaiferber itaiferber Jul 9, 2018

Choose a reason for hiding this comment

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

Sorry, yes! I was looking in the wrong place. Trying to do too many things at once 🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

hash(into:) could use the bitcast approach; isn't that what rawValue does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose it could. I liked the semantic implications of this one, but bitcasting is a little more correct. Do you think it's important enough to be worth changing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Having hashing use the bitcast value feels more inherently correct to me, since an @objc enum can in fact be of any value of its raw type, and a hash implementation ought to feed all of the significant bits of the value to the hasher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized that hash(into:) should probably stay consistent with ==, which has a default implementation for RawRepresentable types, so I'm going to leave this as is.

@jrose-apple jrose-apple force-pushed the ready-for-anything branch from ba964d7 to 0bcd22d Compare July 9, 2018 20:47
@jrose-apple
Copy link
Contributor Author

Reorganized tests only.

@swift-ci Please test Linux

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Jul 9, 2018

Build failed
Swift Test Linux Platform
Git Sha - ba964d7392f38f053b154325b970a8ef60875ae8

@jrose-apple
Copy link
Contributor Author

(source compat bot is having a problem, so I'm going to hold off for a bit)

@jrose-apple jrose-apple force-pushed the ready-for-anything branch from 0bcd22d to 38e0a47 Compare July 9, 2018 21:46
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Jul 9, 2018

Build failed
Swift Test Linux Platform
Git Sha - 0bcd22de5b69b1b672de32144bb3217fb1029843

@jrose-apple
Copy link
Contributor Author

Unrelated SwiftPM failure?

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (1)
TEST OLD NEW DELTA SPEEDUP
Dictionary4Legacy 696 783 +12.5% 0.89x (?)
Improvement (1)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectForced 4882 4551 -6.8% 1.07x (?)
No Changes (456)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3621 3614 -0.2% 1.00x (?)
AnyHashableWithAClass 90867 90878 +0.0% 1.00x (?)
Array2D 2816 2818 +0.1% 1.00x (?)
ArrayAppend 1057 1062 +0.5% 1.00x (?)
ArrayAppendArrayOfInt 788 783 -0.6% 1.01x (?)
ArrayAppendAscii 3845 3847 +0.1% 1.00x (?)
ArrayAppendAsciiSubstring 25193 25182 -0.0% 1.00x (?)
ArrayAppendFromGeneric 793 783 -1.3% 1.01x (?)
ArrayAppendGenericStructs 1428 1424 -0.3% 1.00x (?)
ArrayAppendLatin1 42503 42500 -0.0% 1.00x (?)
ArrayAppendLatin1Substring 142402 142459 +0.0% 1.00x (?)
ArrayAppendLazyMap 1335 1335 +0.0% 1.00x
ArrayAppendOptionals 1424 1425 +0.1% 1.00x (?)
ArrayAppendRepeatCol 1347 1339 -0.6% 1.01x (?)
ArrayAppendReserved 797 798 +0.1% 1.00x (?)
ArrayAppendSequence 1119 1111 -0.7% 1.01x (?)
ArrayAppendStrings 6207 6205 -0.0% 1.00x (?)
ArrayAppendToFromGeneric 796 800 +0.5% 1.00x (?)
ArrayAppendToGeneric 797 799 +0.3% 1.00x (?)
ArrayAppendUTF16 42485 42489 +0.0% 1.00x (?)
ArrayAppendUTF16Substring 139396 139341 -0.0% 1.00x (?)
ArrayInClass 85 85 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 151 149 -1.3% 1.01x (?)
ArrayOfGenericRef 4418 4403 -0.3% 1.00x (?)
ArrayOfPOD 183 184 +0.5% 0.99x (?)
ArrayOfRef 4372 4370 -0.0% 1.00x (?)
ArrayPlusEqualArrayOfInt 792 798 +0.8% 0.99x (?)
ArrayPlusEqualFiveElementCollection 5497 5463 -0.6% 1.01x (?)
ArrayPlusEqualSingleElementCollection 1058 1067 +0.9% 0.99x (?)
ArrayPlusEqualThreeElements 1655 1655 +0.0% 1.00x
ArraySubscript 1539 1531 -0.5% 1.01x (?)
ArrayValueProp 8 8 +0.0% 1.00x
ArrayValueProp2 8 8 +0.0% 1.00x
ArrayValueProp3 8 8 +0.0% 1.00x
ArrayValueProp4 8 8 +0.0% 1.00x
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 103 103 +0.0% 1.00x
COWArrayGuaranteedParameterOverhead 8801 8814 +0.1% 1.00x (?)
COWTree 3656 3670 +0.4% 1.00x (?)
CSVParsing 656199 655555 -0.1% 1.00x (?)
CSVParsingAlt 806899 808478 +0.2% 1.00x (?)
CSVParsingAltIndices 339943 342923 +0.9% 0.99x (?)
CStringLongAscii 4115 4114 -0.0% 1.00x (?)
CStringLongNonAscii 2342 2341 -0.0% 1.00x (?)
CStringShortAscii 3318 3321 +0.1% 1.00x (?)
Calculator 191 191 +0.0% 1.00x
CaptureProp 4110 4106 -0.1% 1.00x (?)
ChainedFilterMap 1408 1408 +0.0% 1.00x
CharIndexing_ascii_unicodeScalars 16276 16278 +0.0% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 16025 16021 -0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars 12331 12341 +0.1% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 12140 12143 +0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars 19502 19486 -0.1% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 19190 19193 +0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars 15787 15794 +0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 15550 15545 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 2957 2957 +0.0% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2915 2917 +0.1% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 3701 3704 +0.1% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 3643 3644 +0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars 13568 13562 -0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 13354 13351 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars 32094 32092 -0.0% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31628 31630 +0.0% 1.00x (?)
CharIndexing_utf16_unicodeScalars 22912 22893 -0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 23285 23279 -0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars 20721 20725 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 15105 15103 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 15673 15672 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 11441 11441 +0.0% 1.00x
CharIteration_japanese_unicodeScalars 24815 24821 +0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 18080 18083 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 20099 20093 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 14643 14647 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 3712 3712 +0.0% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2736 2736 +0.0% 1.00x
CharIteration_punctuated_unicodeScalars 4656 4655 -0.0% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3423 3424 +0.0% 1.00x (?)
CharIteration_russian_unicodeScalars 17256 17252 -0.0% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 12583 12584 +0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 40300 40289 -0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 29834 29831 -0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars 27680 27688 +0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 18647 18642 -0.0% 1.00x (?)
CharacterLiteralsLarge 5810 5815 +0.1% 1.00x (?)
CharacterLiteralsSmall 217 217 +0.0% 1.00x
CharacterPropertiesFetch 4580 4576 -0.1% 1.00x (?)
CharacterPropertiesPrecomputed 1006 1005 -0.1% 1.00x (?)
CharacterPropertiesStashed 1488 1487 -0.1% 1.00x (?)
CharacterPropertiesStashedMemo 1559 1557 -0.1% 1.00x (?)
Chars 1019 1018 -0.1% 1.00x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 495 496 +0.2% 1.00x (?)
DataAccessBytes 1141 1141 +0.0% 1.00x
DataAppendArray 5246 5223 -0.4% 1.00x (?)
DataAppendBytes 4880 4849 -0.6% 1.01x (?)
DataAppendDataLargeToLarge 66591 67124 +0.8% 0.99x (?)
DataAppendDataLargeToMedium 35003 35174 +0.5% 1.00x (?)
DataAppendDataLargeToSmall 34189 34282 +0.3% 1.00x (?)
DataAppendDataMediumToLarge 37503 37534 +0.1% 1.00x (?)
DataAppendDataMediumToMedium 6485 6534 +0.8% 0.99x (?)
DataAppendDataMediumToSmall 5855 5894 +0.7% 0.99x (?)
DataAppendDataSmallToLarge 37002 37168 +0.4% 1.00x (?)
DataAppendDataSmallToMedium 5951 5915 -0.6% 1.01x (?)
DataAppendDataSmallToSmall 5662 5692 +0.5% 0.99x (?)
DataAppendSequence 20663 20282 -1.8% 1.02x (?)
DataCopyBytes 441 441 +0.0% 1.00x
DataCount 37 37 +0.0% 1.00x
DataMutateBytes 3875 3894 +0.5% 1.00x (?)
DataReplaceLarge 36873 36711 -0.4% 1.00x (?)
DataReplaceLargeBuffer 56687 56969 +0.5% 1.00x (?)
DataReplaceMedium 7630 7644 +0.2% 1.00x (?)
DataReplaceMediumBuffer 10949 11044 +0.9% 0.99x (?)
DataReplaceSmall 5699 5554 -2.5% 1.03x (?)
DataReplaceSmallBuffer 8704 8714 +0.1% 1.00x (?)
DataReset 2805 2804 -0.0% 1.00x (?)
DataSetCount 549 549 +0.0% 1.00x
DataSubscript 220 220 +0.0% 1.00x
DictOfArraysToArrayOfDicts 777 778 +0.1% 1.00x (?)
Dictionary 519 519 +0.0% 1.00x
Dictionary2 628 628 +0.0% 1.00x
Dictionary2OfObjects 2090 2089 -0.0% 1.00x (?)
Dictionary3 221 221 +0.0% 1.00x
Dictionary3OfObjects 733 733 +0.0% 1.00x
Dictionary4 322 322 +0.0% 1.00x
Dictionary4OfObjects 440 440 +0.0% 1.00x
Dictionary4OfObjectsLegacy 908 909 +0.1% 1.00x (?)
DictionaryBridge 1205 1168 -3.1% 1.03x (?)
DictionaryBridgeToObjC_Access 908 913 +0.6% 0.99x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 167 168 +0.6% 0.99x (?)
DictionaryCopy 108280 108548 +0.2% 1.00x (?)
DictionaryFilter 107219 106705 -0.5% 1.00x (?)
DictionaryGroup 216 217 +0.5% 1.00x (?)
DictionaryGroupOfObjects 2194 2195 +0.0% 1.00x (?)
DictionaryKeysContainsCocoa 39 39 +0.0% 1.00x
DictionaryKeysContainsNative 31 31 +0.0% 1.00x
DictionaryLiteral 1889 1894 +0.3% 1.00x (?)
DictionaryOfObjects 2396 2390 -0.3% 1.00x (?)
DictionaryRemove 4182 4173 -0.2% 1.00x (?)
DictionaryRemoveOfObjects 25771 25743 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutation 266 266 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 606 606 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 3994 3993 -0.0% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1712 1711 -0.1% 1.00x (?)
DictionarySwap 1031 1031 +0.0% 1.00x
DictionarySwapAt 6645 6641 -0.1% 1.00x (?)
DictionarySwapAtOfObjects 52182 52127 -0.1% 1.00x (?)
DictionarySwapOfObjects 8719 8713 -0.1% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 76 76 +0.0% 1.00x
DropFirstAnyCollectionLazy 65310 65338 +0.0% 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 1841 1841 +0.0% 1.00x
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2681 2680 -0.0% 1.00x (?)
DropFirstSequenceLazy 2774 2774 +0.0% 1.00x
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 21800 21895 +0.4% 1.00x (?)
DropLastAnySeqCRangeIter 3313 3324 +0.3% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3290 3293 +0.1% 1.00x (?)
DropLastAnySeqCntRange 11 11 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 11 11 +0.0% 1.00x
DropLastAnySequence 4956 4957 +0.0% 1.00x (?)
DropLastAnySequenceLazy 5054 5053 -0.0% 1.00x (?)
DropLastCountableRange 11 11 +0.0% 1.00x
DropLastCountableRangeLazy 12 12 +0.0% 1.00x
DropLastSequence 662 663 +0.2% 1.00x (?)
DropLastSequenceLazy 662 662 +0.0% 1.00x
DropWhileAnyCollection 100 100 +0.0% 1.00x
DropWhileAnyCollectionLazy 130 130 +0.0% 1.00x
DropWhileAnySeqCRangeIter 75 76 +1.3% 0.99x (?)
DropWhileAnySeqCRangeIterLazy 130 130 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 130 130 +0.0% 1.00x
DropWhileAnySequence 1860 1860 +0.0% 1.00x
DropWhileAnySequenceLazy 1854 1854 +0.0% 1.00x
DropWhileArrayLazy 88 88 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 105 105 +0.0% 1.00x
DropWhileSequence 2219 2219 +0.0% 1.00x
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 52 52 +0.0% 1.00x
EqualSubstringString 51 51 +0.0% 1.00x
EqualSubstringSubstring 51 51 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 51 51 +0.0% 1.00x
ErrorHandling 1197 1194 -0.3% 1.00x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FatCompactMap 210715 210791 +0.0% 1.00x (?)
FilterEvenUsingReduce 1299 1297 -0.2% 1.00x (?)
FilterEvenUsingReduceInto 148 147 -0.7% 1.01x (?)
FloatingPointPrinting_Double_description_small 21566 21545 -0.1% 1.00x (?)
FloatingPointPrinting_Double_description_uniform 21296 21285 -0.1% 1.00x (?)
FloatingPointPrinting_Double_interpolated 62206 61984 -0.4% 1.00x (?)
FloatingPointPrinting_Float80_description_small 28496 28437 -0.2% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 27703 27739 +0.1% 1.00x (?)
FloatingPointPrinting_Float80_interpolated 65678 65730 +0.1% 1.00x (?)
FloatingPointPrinting_Float_description_small 5366 5364 -0.0% 1.00x (?)
FloatingPointPrinting_Float_description_uniform 5317 5315 -0.0% 1.00x (?)
FloatingPointPrinting_Float_interpolated 38449 38408 -0.1% 1.00x (?)
FrequenciesUsingReduce 4864 4882 +0.4% 1.00x (?)
FrequenciesUsingReduceInto 1509 1510 +0.1% 1.00x (?)
Hanoi 2110 2109 -0.0% 1.00x (?)
HashTest 940 941 +0.1% 1.00x (?)
Histogram 650 650 +0.0% 1.00x
Integrate 342 342 +0.0% 1.00x
IterateData 1546 1546 +0.0% 1.00x
Join 167 167 +0.0% 1.00x
LazilyFilteredArrayContains 37451 37447 -0.0% 1.00x (?)
LazilyFilteredArrays 64881 64908 +0.0% 1.00x (?)
LazilyFilteredRange 3862 3838 -0.6% 1.01x (?)
LessSubstringSubstring 51 50 -2.0% 1.02x
LessSubstringSubstringGenericComparable 51 51 +0.0% 1.00x
LinkedList 7546 7574 +0.4% 1.00x (?)
LuhnAlgoEager 449 450 +0.2% 1.00x (?)
LuhnAlgoLazy 449 449 +0.0% 1.00x
MapReduce 398 398 +0.0% 1.00x
MapReduceAnyCollection 399 399 +0.0% 1.00x
MapReduceAnyCollectionShort 2019 2019 +0.0% 1.00x
MapReduceClass 3003 2996 -0.2% 1.00x (?)
MapReduceClassShort 4552 4552 +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 449 448 -0.2% 1.00x (?)
MapReduceShort 2001 2003 +0.1% 1.00x (?)
MapReduceShortString 20 20 +0.0% 1.00x
MapReduceString 48 48 +0.0% 1.00x
Memset 217 213 -1.8% 1.02x (?)
MonteCarloE 10338 10332 -0.1% 1.00x (?)
MonteCarloPi 42819 42819 +0.0% 1.00x
NSDictionaryCastToSwift 6778 6794 +0.2% 1.00x (?)
NSError 164 164 +0.0% 1.00x
NSStringConversion 689 689 +0.0% 1.00x
NibbleSort 3666 3666 +0.0% 1.00x
NopDeinit 32277 32288 +0.0% 1.00x (?)
ObjectAllocation 132 132 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 24699 24818 +0.5% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 46135 45016 -2.4% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 43003 43975 +2.3% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 105946 106305 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 47069 46712 -0.8% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4918 4911 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 65606 65727 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSString 1222 1221 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2673 2674 +0.0% 1.00x (?)
ObjectiveCBridgeStubDataAppend 6417 6425 +0.1% 1.00x (?)
ObjectiveCBridgeStubDateMutation 400 400 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 32749 33031 +0.9% 0.99x (?)
ObjectiveCBridgeStubFromNSDate 6539 6542 +0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSString 1001 1001 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 155 155 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2540 2561 +0.8% 0.99x (?)
ObjectiveCBridgeStubNSDateMutationRef 13287 13124 -1.2% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString 39409 39601 +0.5% 1.00x (?)
ObjectiveCBridgeStubToNSDate 14467 14516 +0.3% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3460 3495 +1.0% 0.99x (?)
ObjectiveCBridgeStubToNSString 2337 2336 -0.0% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 112 112 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 275490 265627 -3.6% 1.04x (?)
ObjectiveCBridgeStubURLAppendPathRef 273221 273909 +0.3% 1.00x (?)
ObjectiveCBridgeToNSArray 14595 14577 -0.1% 1.00x (?)
ObjectiveCBridgeToNSDictionary 26188 26412 +0.9% 0.99x (?)
ObjectiveCBridgeToNSSet 16700 17045 +2.1% 0.98x (?)
ObjectiveCBridgeToNSString 455 455 +0.0% 1.00x
ObserverClosure 2156 2155 -0.0% 1.00x (?)
ObserverForwarderStruct 1205 1204 -0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 3735 3736 +0.0% 1.00x (?)
ObserverUnappliedMethod 2442 2441 -0.0% 1.00x (?)
OpaqueConsumingUsers 4178 4181 +0.1% 1.00x (?)
OpenClose 65 65 +0.0% 1.00x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 6607 6609 +0.0% 1.00x (?)
PointerArithmetics 31482 31485 +0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1882 1881 -0.1% 1.00x (?)
PopFrontArrayGeneric 1904 1967 +3.3% 0.97x (?)
PopFrontUnsafePointer 8737 9116 +4.3% 0.96x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnyCollectionLazy 65327 65278 -0.1% 1.00x (?)
PrefixAnySeqCRangeIter 40 40 +0.0% 1.00x
PrefixAnySeqCRangeIterLazy 40 40 +0.0% 1.00x
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 1377 1377 +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 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 2217 2217 +0.0% 1.00x
PrefixSequenceLazy 2277 2273 -0.2% 1.00x (?)
PrefixWhileAnyCollection 146 146 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 71 71 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 379 380 +0.3% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 89 89 +0.0% 1.00x
PrefixWhileAnySeqCntRange 142 142 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixWhileAnySequence 1535 1535 +0.0% 1.00x
PrefixWhileAnySequenceLazy 1391 1391 +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 355 355 +0.0% 1.00x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 901 901 +0.0% 1.00x
PrimsSplit 897 898 +0.1% 1.00x (?)
QueueConcrete 1149 1149 +0.0% 1.00x
QueueGeneric 1149 1149 +0.0% 1.00x
RC4 160 160 +0.0% 1.00x
RGBHistogram 2983 2993 +0.3% 1.00x (?)
RGBHistogramOfObjects 23712 23702 -0.0% 1.00x (?)
Radix2CooleyTukey 12397 12424 +0.2% 1.00x (?)
Radix2CooleyTukeyf 8911 8906 -0.1% 1.00x (?)
RandomDoubleDef 26691 26695 +0.0% 1.00x (?)
RandomDoubleLCG 2230 2232 +0.1% 1.00x (?)
RandomIntegersDef 24390 24387 -0.0% 1.00x (?)
RandomIntegersLCG 173 173 +0.0% 1.00x
RandomShuffleDef 811387 809266 -0.3% 1.00x (?)
RandomShuffleLCG 57593 57295 -0.5% 1.01x (?)
RangeAssignment 349 349 +0.0% 1.00x
RangeIterationSigned 171 171 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 1012 1011 -0.1% 1.00x (?)
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 47 47 +0.0% 1.00x
RemoveWhereFilterString 246 246 +0.0% 1.00x
RemoveWhereFilterStrings 437 437 +0.0% 1.00x
RemoveWhereMoveInts 15 15 +0.0% 1.00x
RemoveWhereMoveStrings 708 708 +0.0% 1.00x
RemoveWhereQuadraticInts 1295 1295 +0.0% 1.00x
RemoveWhereQuadraticString 379 370 -2.4% 1.02x (?)
RemoveWhereQuadraticStrings 2763 2759 -0.1% 1.00x (?)
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 860 860 +0.0% 1.00x
ReversedArray 57 57 +0.0% 1.00x
ReversedBidirectional 16935 16947 +0.1% 1.00x (?)
ReversedDictionary 262 264 +0.8% 0.99x (?)
RomanNumbers 84790 84727 -0.1% 1.00x (?)
SequenceAlgosAnySequence 12154 12160 +0.0% 1.00x (?)
SequenceAlgosArray 1570 1574 +0.3% 1.00x (?)
SequenceAlgosContiguousArray 1566 1570 +0.3% 1.00x (?)
SequenceAlgosList 1353 1347 -0.4% 1.00x (?)
SequenceAlgosRange 2575 2576 +0.0% 1.00x (?)
SequenceAlgosUnfoldSequence 1102 1102 +0.0% 1.00x
SetExclusiveOr 5002 5000 -0.0% 1.00x (?)
SetExclusiveOr_OfObjects 11585 11570 -0.1% 1.00x (?)
SetIntersect 690 688 -0.3% 1.00x (?)
SetIntersect_OfObjects 1644 1652 +0.5% 1.00x (?)
SetIsSubsetOf 339 339 +0.0% 1.00x
SetIsSubsetOf_OfObjects 438 439 +0.2% 1.00x (?)
SetUnion 4334 4337 +0.1% 1.00x (?)
SetUnion_OfObjects 10009 9994 -0.1% 1.00x (?)
SevenBoom 839 839 +0.0% 1.00x
Sim2DArray 599 599 +0.0% 1.00x
SortLargeExistentials 5601 5594 -0.1% 1.00x (?)
SortLettersInPlace 995 995 +0.0% 1.00x
SortSortedStrings 856 856 +0.0% 1.00x
SortStrings 1768 1766 -0.1% 1.00x (?)
SortStringsUnicode 2501 2500 -0.0% 1.00x (?)
StackPromo 24785 24890 +0.4% 1.00x (?)
StaticArray 9 9 +0.0% 1.00x
StrComplexWalk 1775 1775 +0.0% 1.00x
StrToInt 3267 3268 +0.0% 1.00x (?)
StringAdder 525 525 +0.0% 1.00x
StringBuilder 436 436 +0.0% 1.00x
StringBuilderLong 1264 1264 +0.0% 1.00x
StringBuilderSmallReservingCapacity 452 452 +0.0% 1.00x
StringBuilderWithLongSubstring 1428 1427 -0.1% 1.00x (?)
StringComparison_abnormal 792 790 -0.3% 1.00x (?)
StringComparison_ascii 1008 1009 +0.1% 1.00x (?)
StringComparison_emoji 854 854 +0.0% 1.00x
StringComparison_fastPrenormal 835 835 +0.0% 1.00x
StringComparison_latin1 655 654 -0.2% 1.00x (?)
StringComparison_longSharedPrefix 948 948 +0.0% 1.00x
StringComparison_nonBMPSlowestPrenormal 1673 1673 +0.0% 1.00x
StringComparison_slowerPrenormal 1790 1789 -0.1% 1.00x (?)
StringComparison_zalgo 111809 111918 +0.1% 1.00x (?)
StringEdits 169846 169994 +0.1% 1.00x (?)
StringEnumRawValueInitialization 866 867 +0.1% 1.00x (?)
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2204 2204 +0.0% 1.00x
StringHasPrefixUnicode 99318 99316 -0.0% 1.00x (?)
StringHasSuffixAscii 2232 2232 +0.0% 1.00x
StringHasSuffixUnicode 99965 100151 +0.2% 1.00x (?)
StringHashing_abnormal 1355 1352 -0.2% 1.00x (?)
StringHashing_ascii 33 33 +0.0% 1.00x
StringHashing_emoji 1961 1972 +0.6% 0.99x (?)
StringHashing_fastPrenormal 8490 8481 -0.1% 1.00x (?)
StringHashing_latin1 2593 2593 +0.0% 1.00x
StringHashing_longSharedPrefix 8142 8142 +0.0% 1.00x
StringHashing_nonBMPSlowestPrenormal 2155 2156 +0.0% 1.00x (?)
StringHashing_slowerPrenormal 2755 2753 -0.1% 1.00x (?)
StringHashing_zalgo 3518 3518 +0.0% 1.00x
StringInterpolation 9173 9224 +0.6% 0.99x (?)
StringInterpolationManySmallSegments 18216 18430 +1.2% 0.99x (?)
StringInterpolationSmall 4134 4131 -0.1% 1.00x (?)
StringMatch 12133 12140 +0.1% 1.00x (?)
StringRemoveDupes 481 481 +0.0% 1.00x
StringUTF16Builder 2620 2609 -0.4% 1.00x (?)
StringUTF16SubstringBuilder 5700 5687 -0.2% 1.00x (?)
StringWalk 1545 1545 +0.0% 1.00x
StringWithCString 46370 46345 -0.1% 1.00x (?)
StringWordBuilder 2313 2317 +0.2% 1.00x (?)
StringWordBuilderReservingCapacity 1917 1922 +0.3% 1.00x (?)
SubstringComparable 13 13 +0.0% 1.00x
SubstringEqualString 642 642 +0.0% 1.00x
SubstringEquatable 1484 1486 +0.1% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 74 74 +0.0% 1.00x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 21819 21821 +0.0% 1.00x (?)
SuffixAnySeqCRangeIter 3635 3636 +0.0% 1.00x (?)
SuffixAnySeqCRangeIterLazy 3634 3631 -0.1% 1.00x (?)
SuffixAnySeqCntRange 17 17 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 17 17 +0.0% 1.00x
SuffixAnySequence 4930 4924 -0.1% 1.00x (?)
SuffixAnySequenceLazy 5046 5043 -0.1% 1.00x (?)
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 11 11 +0.0% 1.00x
SuffixSequence 3662 3666 +0.1% 1.00x (?)
SuffixSequenceLazy 3654 3664 +0.3% 1.00x (?)
SumUsingReduce 97 97 +0.0% 1.00x
SumUsingReduceInto 97 97 +0.0% 1.00x
SuperChars 20028 20001 -0.1% 1.00x (?)
TwoSum 1469 1467 -0.1% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 298 298 +0.0% 1.00x
UTF8Decode_InitDecoding 1351 1352 +0.1% 1.00x (?)
UTF8Decode_InitDecoding_ascii 653 654 +0.2% 1.00x (?)
UTF8Decode_InitFromBytes 1177 1168 -0.8% 1.01x (?)
UTF8Decode_InitFromBytes_ascii 505 507 +0.4% 1.00x (?)
UTF8Decode_InitFromData 1258 1243 -1.2% 1.01x (?)
UTF8Decode_InitFromData_ascii 670 676 +0.9% 0.99x (?)
Walsh 444 445 +0.2% 1.00x (?)
WordCountHistogramASCII 7828 7826 -0.0% 1.00x (?)
WordCountHistogramUTF16 11234 11191 -0.4% 1.00x (?)
WordCountUniqueASCII 2107 2106 -0.0% 1.00x (?)
WordCountUniqueUTF16 4543 4540 -0.1% 1.00x (?)
WordSplitASCII 9092 9339 +2.7% 0.97x (?)
WordSplitUTF16 10467 10529 +0.6% 0.99x (?)
XorLoop 402 402 +0.0% 1.00x

Unoptimized (Onone)

Regression (4)
TEST OLD NEW DELTA SPEEDUP
UTF8Decode_InitFromData_ascii 741 855 +15.4% 0.87x (?)
DictionaryBridgeToObjC_Access 1492 1637 +9.7% 0.91x (?)
DataReplaceSmallBuffer 8803 9407 +6.9% 0.94x (?)
FloatingPointPrinting_Float_interpolated 67796 71726 +5.8% 0.95x (?)
Improvement (5)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectForced 9299 8551 -8.0% 1.09x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 118142 110446 -6.5% 1.07x (?)
StringBuilderLong 1528 1433 -6.2% 1.07x (?)
UTF8Decode_InitFromBytes_ascii 552 521 -5.6% 1.06x (?)
RGBHistogram 24454 23170 -5.3% 1.06x (?)
No Changes (449)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 5039 5012 -0.5% 1.01x (?)
AnyHashableWithAClass 107254 107226 -0.0% 1.00x (?)
Array2D 622906 617956 -0.8% 1.01x (?)
ArrayAppend 4551 4551 +0.0% 1.00x
ArrayAppendArrayOfInt 863 856 -0.8% 1.01x (?)
ArrayAppendAscii 26954 26955 +0.0% 1.00x (?)
ArrayAppendAsciiSubstring 71459 71379 -0.1% 1.00x (?)
ArrayAppendFromGeneric 868 866 -0.2% 1.00x (?)
ArrayAppendGenericStructs 1510 1498 -0.8% 1.01x (?)
ArrayAppendLatin1 66313 66217 -0.1% 1.00x (?)
ArrayAppendLatin1Substring 160086 159788 -0.2% 1.00x (?)
ArrayAppendLazyMap 166066 166276 +0.1% 1.00x (?)
ArrayAppendOptionals 1506 1505 -0.1% 1.00x (?)
ArrayAppendRepeatCol 192809 192829 +0.0% 1.00x (?)
ArrayAppendReserved 4555 4566 +0.2% 1.00x (?)
ArrayAppendSequence 103528 103660 +0.1% 1.00x (?)
ArrayAppendStrings 6336 6328 -0.1% 1.00x (?)
ArrayAppendToFromGeneric 859 859 +0.0% 1.00x
ArrayAppendToGeneric 874 875 +0.1% 1.00x (?)
ArrayAppendUTF16 66448 66426 -0.0% 1.00x (?)
ArrayAppendUTF16Substring 157600 157826 +0.1% 1.00x (?)
ArrayInClass 6369 6371 +0.0% 1.00x (?)
ArrayLiteral 1790 1784 -0.3% 1.00x (?)
ArrayOfGenericPOD2 1127 1128 +0.1% 1.00x (?)
ArrayOfGenericRef 10530 10534 +0.0% 1.00x (?)
ArrayOfPOD 760 760 +0.0% 1.00x
ArrayOfRef 9669 9706 +0.4% 1.00x (?)
ArrayPlusEqualArrayOfInt 852 869 +2.0% 0.98x (?)
ArrayPlusEqualFiveElementCollection 227964 227404 -0.2% 1.00x (?)
ArrayPlusEqualSingleElementCollection 225863 224190 -0.7% 1.01x (?)
ArrayPlusEqualThreeElements 9064 9036 -0.3% 1.00x (?)
ArraySubscript 108060 108015 -0.0% 1.00x (?)
ArrayValueProp 3684 3670 -0.4% 1.00x (?)
ArrayValueProp2 14924 14940 +0.1% 1.00x (?)
ArrayValueProp3 4219 4218 -0.0% 1.00x (?)
ArrayValueProp4 4134 4140 +0.1% 1.00x (?)
BinaryFloatingPointPropertiesBinade 88 88 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 132 132 +0.0% 1.00x
BinaryFloatingPointPropertiesUlp 140 140 +0.0% 1.00x
BitCount 8733 8734 +0.0% 1.00x (?)
ByteSwap 9739 9740 +0.0% 1.00x (?)
COWArrayGuaranteedParameterOverhead 14459 14149 -2.1% 1.02x (?)
COWTree 11781 11796 +0.1% 1.00x (?)
CSVParsing 2790315 2893163 +3.7% 0.96x (?)
CSVParsingAlt 1428485 1430655 +0.2% 1.00x (?)
CSVParsingAltIndices 2441540 2432625 -0.4% 1.00x (?)
CStringLongAscii 4213 4202 -0.3% 1.00x (?)
CStringLongNonAscii 2486 2509 +0.9% 0.99x (?)
CStringShortAscii 6073 6074 +0.0% 1.00x (?)
Calculator 941 942 +0.1% 1.00x (?)
CaptureProp 285807 286034 +0.1% 1.00x (?)
ChainedFilterMap 231762 232244 +0.2% 1.00x (?)
CharIndexing_ascii_unicodeScalars 319778 317192 -0.8% 1.01x (?)
CharIndexing_ascii_unicodeScalars_Backwards 368615 368035 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars 242479 242586 +0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 269285 269645 +0.1% 1.00x (?)
CharIndexing_japanese_unicodeScalars 380406 384534 +1.1% 0.99x (?)
CharIndexing_japanese_unicodeScalars_Backwards 429559 430095 +0.1% 1.00x (?)
CharIndexing_korean_unicodeScalars 307690 311604 +1.3% 0.99x (?)
CharIndexing_korean_unicodeScalars_Backwards 346290 347711 +0.4% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 56195 57361 +2.1% 0.98x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 63299 62055 -2.0% 1.02x (?)
CharIndexing_punctuated_unicodeScalars 72010 71263 -1.0% 1.01x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 80321 81199 +1.1% 0.99x (?)
CharIndexing_russian_unicodeScalars 264259 265270 +0.4% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 305941 305354 -0.2% 1.00x (?)
CharIndexing_tweet_unicodeScalars 632825 627599 -0.8% 1.01x (?)
CharIndexing_tweet_unicodeScalars_Backwards 719199 711884 -1.0% 1.01x (?)
CharIndexing_utf16_unicodeScalars 277914 278107 +0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 311318 311113 -0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars 147629 147602 -0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 249748 249711 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 112115 112386 +0.2% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 191087 191207 +0.1% 1.00x (?)
CharIteration_japanese_unicodeScalars 177256 177279 +0.0% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 299826 299723 -0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 143749 144028 +0.2% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 242722 242514 -0.1% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 26353 26357 +0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 43435 43394 -0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars 33067 33046 -0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 54893 54847 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 122839 123082 +0.2% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 208979 208085 -0.4% 1.00x (?)
CharIteration_tweet_unicodeScalars 302304 302317 +0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 503589 517443 +2.8% 0.97x (?)
CharIteration_utf16_unicodeScalars 125717 125744 +0.0% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 216463 216656 +0.1% 1.00x (?)
CharacterLiteralsLarge 5771 5770 -0.0% 1.00x (?)
CharacterLiteralsSmall 658 658 +0.0% 1.00x
CharacterPropertiesFetch 5561 5473 -1.6% 1.02x (?)
CharacterPropertiesPrecomputed 3531 3515 -0.5% 1.00x (?)
CharacterPropertiesStashed 2338 2335 -0.1% 1.00x (?)
CharacterPropertiesStashedMemo 4374 4440 +1.5% 0.99x (?)
Chars 35231 35211 -0.1% 1.00x (?)
ClassArrayGetter 964 963 -0.1% 1.00x (?)
Combos 2351 2405 +2.3% 0.98x (?)
DataAccessBytes 2307 2317 +0.4% 1.00x (?)
DataAppendArray 5142 5293 +2.9% 0.97x (?)
DataAppendBytes 4969 4912 -1.1% 1.01x (?)
DataAppendDataLargeToLarge 66759 66550 -0.3% 1.00x (?)
DataAppendDataLargeToMedium 35548 35421 -0.4% 1.00x (?)
DataAppendDataLargeToSmall 34802 34557 -0.7% 1.01x (?)
DataAppendDataMediumToLarge 37740 37726 -0.0% 1.00x (?)
DataAppendDataMediumToMedium 6561 6580 +0.3% 1.00x (?)
DataAppendDataMediumToSmall 6007 5940 -1.1% 1.01x (?)
DataAppendDataSmallToLarge 36881 37427 +1.5% 0.99x (?)
DataAppendDataSmallToMedium 6061 6022 -0.6% 1.01x (?)
DataAppendDataSmallToSmall 6050 5882 -2.8% 1.03x (?)
DataAppendSequence 1992668 1991566 -0.1% 1.00x (?)
DataCopyBytes 466 453 -2.8% 1.03x (?)
DataCount 223 223 +0.0% 1.00x
DataMutateBytes 5077 5071 -0.1% 1.00x (?)
DataReplaceLarge 37401 36422 -2.6% 1.03x (?)
DataReplaceLargeBuffer 57235 57614 +0.7% 0.99x (?)
DataReplaceMedium 8042 7755 -3.6% 1.04x (?)
DataReplaceMediumBuffer 11335 11807 +4.2% 0.96x (?)
DataReplaceSmall 5651 5588 -1.1% 1.01x (?)
DataReset 2847 2854 +0.2% 1.00x (?)
DataSetCount 582 563 -3.3% 1.03x (?)
DataSubscript 443 444 +0.2% 1.00x
DictOfArraysToArrayOfDicts 3549 3515 -1.0% 1.01x (?)
Dictionary 2149 2149 +0.0% 1.00x
Dictionary2 1288 1285 -0.2% 1.00x (?)
Dictionary2OfObjects 4262 4216 -1.1% 1.01x (?)
Dictionary3 834 835 +0.1% 1.00x (?)
Dictionary3OfObjects 2118 2128 +0.5% 1.00x (?)
Dictionary4 1199 1195 -0.3% 1.00x (?)
Dictionary4Legacy 1441 1442 +0.1% 1.00x (?)
Dictionary4OfObjects 1794 1790 -0.2% 1.00x (?)
Dictionary4OfObjectsLegacy 2049 2065 +0.8% 0.99x (?)
DictionaryBridge 1312 1301 -0.8% 1.01x (?)
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 168 170 +1.2% 0.99x (?)
DictionaryCopy 309241 310083 +0.3% 1.00x (?)
DictionaryFilter 323613 324612 +0.3% 1.00x (?)
DictionaryGroup 4875 4874 -0.0% 1.00x (?)
DictionaryGroupOfObjects 6929 6906 -0.3% 1.00x (?)
DictionaryKeysContainsCocoa 70 70 +0.0% 1.00x
DictionaryKeysContainsNative 54 54 +0.0% 1.00x
DictionaryLiteral 8629 8631 +0.0% 1.00x (?)
DictionaryOfObjects 5876 5891 +0.3% 1.00x (?)
DictionaryRemove 17177 17168 -0.1% 1.00x (?)
DictionaryRemoveOfObjects 52708 53168 +0.9% 0.99x (?)
DictionarySubscriptDefaultMutation 1972 1983 +0.6% 0.99x (?)
DictionarySubscriptDefaultMutationArray 2223 2227 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9624 9545 -0.8% 1.01x (?)
DictionarySubscriptDefaultMutationOfObjects 5607 5609 +0.0% 1.00x (?)
DictionarySwap 4958 4950 -0.2% 1.00x (?)
DictionarySwapAt 32543 32405 -0.4% 1.00x (?)
DictionarySwapAtOfObjects 113839 113123 -0.6% 1.01x (?)
DictionarySwapOfObjects 19006 19087 +0.4% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 15742 15699 -0.3% 1.00x (?)
DropFirstAnyCollectionLazy 104049 104172 +0.1% 1.00x (?)
DropFirstAnySeqCRangeIter 24160 24205 +0.2% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 24207 24208 +0.0% 1.00x (?)
DropFirstAnySeqCntRange 15718 15683 -0.2% 1.00x (?)
DropFirstAnySeqCntRangeLazy 15746 15733 -0.1% 1.00x (?)
DropFirstAnySequence 13090 13073 -0.1% 1.00x (?)
DropFirstAnySequenceLazy 12943 12927 -0.1% 1.00x (?)
DropFirstArray 3488 3487 -0.0% 1.00x (?)
DropFirstArrayLazy 33769 34700 +2.8% 0.97x (?)
DropFirstCountableRange 346 346 +0.0% 1.00x
DropFirstCountableRangeLazy 42512 42357 -0.4% 1.00x (?)
DropFirstSequence 12607 12612 +0.0% 1.00x (?)
DropFirstSequenceLazy 12560 12524 -0.3% 1.00x (?)
DropLastAnyCollection 5274 5279 +0.1% 1.00x (?)
DropLastAnyCollectionLazy 35446 34704 -2.1% 1.02x (?)
DropLastAnySeqCRangeIter 43711 43887 +0.4% 1.00x (?)
DropLastAnySeqCRangeIterLazy 43507 43538 +0.1% 1.00x (?)
DropLastAnySeqCntRange 5265 5262 -0.1% 1.00x (?)
DropLastAnySeqCntRangeLazy 5271 5255 -0.3% 1.00x (?)
DropLastAnySequence 29526 29474 -0.2% 1.00x (?)
DropLastAnySequenceLazy 29703 29532 -0.6% 1.01x (?)
DropLastCountableRange 120 120 +0.0% 1.00x
DropLastCountableRangeLazy 14131 14100 -0.2% 1.00x (?)
DropLastSequence 29511 29432 -0.3% 1.00x (?)
DropLastSequenceLazy 29328 29323 -0.0% 1.00x (?)
DropWhileAnyCollection 20384 20332 -0.3% 1.00x (?)
DropWhileAnyCollectionLazy 23053 23056 +0.0% 1.00x (?)
DropWhileAnySeqCRangeIter 28661 28725 +0.2% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 22778 22778 +0.0% 1.00x
DropWhileAnySeqCntRange 20350 20330 -0.1% 1.00x (?)
DropWhileAnySeqCntRangeLazy 22862 22879 +0.1% 1.00x (?)
DropWhileAnySequence 13580 13578 -0.0% 1.00x (?)
DropWhileAnySequenceLazy 12459 12447 -0.1% 1.00x (?)
DropWhileArrayLazy 13773 13757 -0.1% 1.00x (?)
DropWhileCountableRange 5036 5031 -0.1% 1.00x (?)
DropWhileCountableRangeLazy 22493 22486 -0.0% 1.00x (?)
DropWhileSequence 13193 13206 +0.1% 1.00x (?)
DropWhileSequenceLazy 12176 12158 -0.1% 1.00x (?)
EqualStringSubstring 73 73 +0.0% 1.00x
EqualSubstringString 73 73 +0.0% 1.00x
EqualSubstringSubstring 74 75 +1.4% 0.99x
EqualSubstringSubstringGenericEquatable 60 60 +0.0% 1.00x
ErrorHandling 5127 5110 -0.3% 1.00x (?)
ExclusivityGlobal 191 191 +0.0% 1.00x
ExclusivityIndependent 73 73 +0.0% 1.00x
FatCompactMap 288944 290015 +0.4% 1.00x (?)
FilterEvenUsingReduce 3577 3570 -0.2% 1.00x (?)
FilterEvenUsingReduceInto 1934 1934 +0.0% 1.00x
FloatingPointPrinting_Double_description_small 22779 22649 -0.6% 1.01x (?)
FloatingPointPrinting_Double_description_uniform 34034 33978 -0.2% 1.00x (?)
FloatingPointPrinting_Double_interpolated 97439 93460 -4.1% 1.04x (?)
FloatingPointPrinting_Float80_description_small 29392 29707 +1.1% 0.99x (?)
FloatingPointPrinting_Float80_description_uniform 61847 60357 -2.4% 1.02x (?)
FloatingPointPrinting_Float80_interpolated 123470 125223 +1.4% 0.99x (?)
FloatingPointPrinting_Float_description_small 6378 6378 +0.0% 1.00x
FloatingPointPrinting_Float_description_uniform 17262 17245 -0.1% 1.00x (?)
FrequenciesUsingReduce 10484 10440 -0.4% 1.00x (?)
FrequenciesUsingReduceInto 3132 3137 +0.2% 1.00x (?)
Hanoi 19170 19178 +0.0% 1.00x (?)
HashTest 21502 21220 -1.3% 1.01x (?)
Histogram 6306 6301 -0.1% 1.00x (?)
Integrate 587 587 +0.0% 1.00x
IterateData 4965 4967 +0.0% 1.00x (?)
Join 188 188 +0.0% 1.00x
LazilyFilteredArrayContains 736091 737369 +0.2% 1.00x (?)
LazilyFilteredArrays 1422638 1425671 +0.2% 1.00x (?)
LazilyFilteredRange 543734 543775 +0.0% 1.00x (?)
LessSubstringSubstring 74 74 +0.0% 1.00x
LessSubstringSubstringGenericComparable 59 60 +1.7% 0.98x
LinkedList 32487 32482 -0.0% 1.00x (?)
LuhnAlgoEager 5980 5963 -0.3% 1.00x (?)
LuhnAlgoLazy 6167 6202 +0.6% 0.99x (?)
MapReduce 25111 25116 +0.0% 1.00x (?)
MapReduceAnyCollection 24894 24858 -0.1% 1.00x (?)
MapReduceAnyCollectionShort 36387 36771 +1.1% 0.99x (?)
MapReduceClass 28903 28869 -0.1% 1.00x (?)
MapReduceClassShort 39633 40211 +1.5% 0.99x (?)
MapReduceLazyCollection 22484 22395 -0.4% 1.00x (?)
MapReduceLazyCollectionShort 32676 33210 +1.6% 0.98x (?)
MapReduceLazySequence 20296 20319 +0.1% 1.00x (?)
MapReduceSequence 30708 30116 -1.9% 1.02x (?)
MapReduceShort 35807 36190 +1.1% 0.99x (?)
MapReduceShortString 231 229 -0.9% 1.01x (?)
MapReduceString 1729 1730 +0.1% 1.00x (?)
Memset 45099 45080 -0.0% 1.00x (?)
MonteCarloE 1151869 1149214 -0.2% 1.00x
MonteCarloPi 5217455 5218953 +0.0% 1.00x (?)
NSDictionaryCastToSwift 7864 8036 +2.2% 0.98x (?)
NSError 603 616 +2.2% 0.98x (?)
NSStringConversion 742 742 +0.0% 1.00x
NibbleSort 512662 512910 +0.0% 1.00x (?)
NopDeinit 199276 199282 +0.0% 1.00x (?)
ObjectAllocation 1257 1287 +2.4% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObject 28917 28743 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 49800 49698 -0.2% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 45819 46461 +1.4% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObject 52907 52386 -1.0% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 5531 5692 +2.9% 0.97x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 74035 73666 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSString 2933 2916 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2805 2825 +0.7% 0.99x (?)
ObjectiveCBridgeStubDataAppend 6940 6936 -0.1% 1.00x (?)
ObjectiveCBridgeStubDateMutation 775 773 -0.3% 1.00x (?)
ObjectiveCBridgeStubFromArrayOfNSString 33005 33839 +2.5% 0.98x (?)
ObjectiveCBridgeStubFromNSDate 6949 6953 +0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSString 1065 1065 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 193 193 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 3053 3014 -1.3% 1.01x (?)
ObjectiveCBridgeStubNSDateMutationRef 15520 15624 +0.7% 0.99x (?)
ObjectiveCBridgeStubToArrayOfNSString 40727 39806 -2.3% 1.02x (?)
ObjectiveCBridgeStubToNSDate 15290 15692 +2.6% 0.97x (?)
ObjectiveCBridgeStubToNSDateRef 3466 3480 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSString 2432 2425 -0.3% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 153 153 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 286456 287537 +0.4% 1.00x (?)
ObjectiveCBridgeStubURLAppendPathRef 289935 285894 -1.4% 1.01x (?)
ObjectiveCBridgeToNSArray 15368 14882 -3.2% 1.03x (?)
ObjectiveCBridgeToNSDictionary 28062 27192 -3.1% 1.03x (?)
ObjectiveCBridgeToNSSet 17672 18011 +1.9% 0.98x (?)
ObjectiveCBridgeToNSString 542 542 +0.0% 1.00x
ObserverClosure 6349 6346 -0.0% 1.00x (?)
ObserverForwarderStruct 4139 4188 +1.2% 0.99x (?)
ObserverPartiallyAppliedMethod 7925 7930 +0.1% 1.00x (?)
ObserverUnappliedMethod 7885 7831 -0.7% 1.01x (?)
OpaqueConsumingUsers 14022 14014 -0.1% 1.00x (?)
OpenClose 552 553 +0.2% 1.00x (?)
PartialApplyDynamicType 42392 42524 +0.3% 1.00x (?)
Phonebook 15296 15303 +0.0% 1.00x (?)
PointerArithmetics 131652 131708 +0.0% 1.00x (?)
PolymorphicCalls 2465 2466 +0.0% 1.00x (?)
PopFrontArray 4692 4654 -0.8% 1.01x (?)
PopFrontArrayGeneric 5316 5274 -0.8% 1.01x (?)
PopFrontUnsafePointer 11209 11258 +0.4% 1.00x (?)
PrefixAnyCollection 15633 15694 +0.4% 1.00x (?)
PrefixAnyCollectionLazy 106923 105036 -1.8% 1.02x (?)
PrefixAnySeqCRangeIter 19374 19341 -0.2% 1.00x (?)
PrefixAnySeqCRangeIterLazy 19264 19276 +0.1% 1.00x (?)
PrefixAnySeqCntRange 15608 15606 -0.0% 1.00x (?)
PrefixAnySeqCntRangeLazy 15707 15774 +0.4% 1.00x (?)
PrefixAnySequence 10722 10720 -0.0% 1.00x (?)
PrefixAnySequenceLazy 10473 10563 +0.9% 0.99x (?)
PrefixArray 3469 3471 +0.1% 1.00x (?)
PrefixArrayLazy 33978 33887 -0.3% 1.00x (?)
PrefixCountableRange 346 345 -0.3% 1.00x
PrefixCountableRangeLazy 42408 42385 -0.1% 1.00x (?)
PrefixSequence 10288 10265 -0.2% 1.00x (?)
PrefixSequenceLazy 10127 10137 +0.1% 1.00x (?)
PrefixWhileAnyCollection 29669 29624 -0.2% 1.00x (?)
PrefixWhileAnyCollectionLazy 18935 18996 +0.3% 1.00x (?)
PrefixWhileAnySeqCRangeIter 37019 36909 -0.3% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 18838 18842 +0.0% 1.00x (?)
PrefixWhileAnySeqCntRange 29517 29601 +0.3% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 18956 18964 +0.0% 1.00x (?)
PrefixWhileAnySequence 26078 26082 +0.0% 1.00x (?)
PrefixWhileAnySequenceLazy 11044 11051 +0.1% 1.00x (?)
PrefixWhileArray 10410 10400 -0.1% 1.00x (?)
PrefixWhileArrayLazy 12113 12080 -0.3% 1.00x (?)
PrefixWhileCountableRange 14146 14143 -0.0% 1.00x (?)
PrefixWhileCountableRangeLazy 18754 18749 -0.0% 1.00x (?)
PrefixWhileSequence 25663 25599 -0.2% 1.00x (?)
PrefixWhileSequenceLazy 10824 10831 +0.1% 1.00x (?)
Prims 9218 9224 +0.1% 1.00x (?)
PrimsSplit 9281 9282 +0.0% 1.00x (?)
QueueConcrete 13944 13916 -0.2% 1.00x (?)
QueueGeneric 18727 18623 -0.6% 1.01x (?)
RC4 16271 16270 -0.0% 1.00x (?)
RGBHistogramOfObjects 78099 79141 +1.3% 0.99x (?)
Radix2CooleyTukey 41700 41772 +0.2% 1.00x (?)
Radix2CooleyTukeyf 35527 35501 -0.1% 1.00x (?)
RandomDoubleDef 95285 94504 -0.8% 1.01x (?)
RandomDoubleLCG 63941 63885 -0.1% 1.00x (?)
RandomIntegersDef 43853 43867 +0.0% 1.00x (?)
RandomIntegersLCG 32331 32312 -0.1% 1.00x (?)
RandomShuffleDef 2181647 2183248 +0.1% 1.00x (?)
RandomShuffleLCG 1436918 1435862 -0.1% 1.00x (?)
RangeAssignment 2760 2768 +0.3% 1.00x (?)
RangeIterationSigned 15088 15079 -0.1% 1.00x (?)
RangeReplaceableCollectionPlusDefault 11233 11290 +0.5% 0.99x (?)
RecursiveOwnedParameter 6196 6196 +0.0% 1.00x
RemoveWhereFilterInts 2059 2059 +0.0% 1.00x
RemoveWhereFilterString 1329 1328 -0.1% 1.00x (?)
RemoveWhereFilterStrings 2587 2588 +0.0% 1.00x (?)
RemoveWhereMoveInts 3354 3356 +0.1% 1.00x (?)
RemoveWhereMoveStrings 3900 3900 +0.0% 1.00x
RemoveWhereQuadraticInts 8456 8480 +0.3% 1.00x (?)
RemoveWhereQuadraticString 2601 2601 +0.0% 1.00x
RemoveWhereQuadraticStrings 10136 10093 -0.4% 1.00x (?)
RemoveWhereSwapInts 5992 5991 -0.0% 1.00x (?)
RemoveWhereSwapStrings 6728 6722 -0.1% 1.00x (?)
ReversedArray 12529 12533 +0.0% 1.00x (?)
ReversedBidirectional 44761 44579 -0.4% 1.00x (?)
ReversedDictionary 23694 23662 -0.1% 1.00x (?)
RomanNumbers 1289622 1290126 +0.0% 1.00x (?)
SequenceAlgosAnySequence 13222 13238 +0.1% 1.00x (?)
SequenceAlgosArray 734415 734621 +0.0% 1.00x (?)
SequenceAlgosContiguousArray 300867 300853 -0.0% 1.00x (?)
SequenceAlgosList 8893 8908 +0.2% 1.00x (?)
SequenceAlgosRange 1297583 1295785 -0.1% 1.00x (?)
SequenceAlgosUnfoldSequence 6472 6457 -0.2% 1.00x (?)
SetExclusiveOr 16624 16587 -0.2% 1.00x (?)
SetExclusiveOr_OfObjects 42258 42215 -0.1% 1.00x (?)
SetIntersect 6877 6873 -0.1% 1.00x (?)
SetIntersect_OfObjects 10735 10769 +0.3% 1.00x (?)
SetIsSubsetOf 1260 1259 -0.1% 1.00x (?)
SetIsSubsetOf_OfObjects 2330 2329 -0.0% 1.00x (?)
SetUnion 11765 11783 +0.2% 1.00x (?)
SetUnion_OfObjects 30349 30342 -0.0% 1.00x (?)
SevenBoom 1017 1026 +0.9% 0.99x (?)
Sim2DArray 43844 43839 -0.0% 1.00x (?)
SortLargeExistentials 9786 9792 +0.1% 1.00x (?)
SortLettersInPlace 1572 1576 +0.3% 1.00x (?)
SortSortedStrings 896 896 +0.0% 1.00x
SortStrings 1864 1864 +0.0% 1.00x
SortStringsUnicode 2755 2753 -0.1% 1.00x (?)
StackPromo 91503 94373 +3.1% 0.97x (?)
StaticArray 2578 2593 +0.6% 0.99x (?)
StrComplexWalk 7271 7264 -0.1% 1.00x (?)
StrToInt 80199 80205 +0.0% 1.00x (?)
StringAdder 716 716 +0.0% 1.00x
StringBuilder 5018 4999 -0.4% 1.00x (?)
StringBuilderSmallReservingCapacity 5042 5021 -0.4% 1.00x (?)
StringBuilderWithLongSubstring 3307 3192 -3.5% 1.04x (?)
StringComparison_abnormal 1350 1295 -4.1% 1.04x (?)
StringComparison_ascii 8829 8827 -0.0% 1.00x (?)
StringComparison_emoji 2021 2021 +0.0% 1.00x
StringComparison_fastPrenormal 4853 4856 +0.1% 1.00x (?)
StringComparison_latin1 3779 3778 -0.0% 1.00x (?)
StringComparison_longSharedPrefix 2338 2339 +0.0% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 3889 3884 -0.1% 1.00x (?)
StringComparison_slowerPrenormal 4143 4139 -0.1% 1.00x (?)
StringComparison_zalgo 114449 114722 +0.2% 1.00x (?)
StringEdits 384527 399478 +3.9% 0.96x (?)
StringEnumRawValueInitialization 21427 21458 +0.1% 1.00x (?)
StringEqualPointerComparison 1768 1769 +0.1% 1.00x (?)
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 200 199 -0.5% 1.01x (?)
StringHasPrefixAscii 3268 3270 +0.1% 1.00x (?)
StringHasPrefixUnicode 100602 100954 +0.3% 1.00x (?)
StringHasSuffixAscii 3299 3293 -0.2% 1.00x (?)
StringHasSuffixUnicode 100765 101153 +0.4% 1.00x (?)
StringHashing_abnormal 1453 1464 +0.8% 0.99x (?)
StringHashing_ascii 208 208 +0.0% 1.00x
StringHashing_emoji 2217 2172 -2.0% 1.02x (?)
StringHashing_fastPrenormal 8753 8736 -0.2% 1.00x (?)
StringHashing_latin1 2805 2807 +0.1% 1.00x (?)
StringHashing_longSharedPrefix 8301 8294 -0.1% 1.00x (?)
StringHashing_nonBMPSlowestPrenormal 2380 2370 -0.4% 1.00x (?)
StringHashing_slowerPrenormal 2956 2963 +0.2% 1.00x (?)
StringHashing_zalgo 3610 3629 +0.5% 0.99x (?)
StringInterpolation 12592 12578 -0.1% 1.00x (?)
StringInterpolationManySmallSegments 18500 18945 +2.4% 0.98x (?)
StringInterpolationSmall 6624 6565 -0.9% 1.01x (?)
StringMatch 39982 40390 +1.0% 0.99x (?)
StringRemoveDupes 730 730 +0.0% 1.00x
StringUTF16Builder 7620 7881 +3.4% 0.97x (?)
StringUTF16SubstringBuilder 21867 21512 -1.6% 1.02x (?)
StringWalk 12915 12908 -0.1% 1.00x (?)
StringWithCString 43457 43472 +0.0% 1.00x (?)
StringWordBuilder 2437 2437 +0.0% 1.00x
StringWordBuilderReservingCapacity 2064 2065 +0.0% 1.00x (?)
SubstringComparable 1577 1578 +0.1% 1.00x (?)
SubstringEqualString 1726 1724 -0.1% 1.00x (?)
SubstringEquatable 5394 5458 +1.2% 0.99x (?)
SubstringFromLongString 15 15 +0.0% 1.00x
SubstringFromLongStringGeneric 104 104 +0.0% 1.00x
SuffixAnyCollection 5266 5254 -0.2% 1.00x (?)
SuffixAnyCollectionLazy 35058 35521 +1.3% 0.99x (?)
SuffixAnySeqCRangeIter 36615 36589 -0.1% 1.00x (?)
SuffixAnySeqCRangeIterLazy 36490 36502 +0.0% 1.00x (?)
SuffixAnySeqCntRange 5224 5214 -0.2% 1.00x (?)
SuffixAnySeqCntRangeLazy 5255 5261 +0.1% 1.00x (?)
SuffixAnySequence 25230 25218 -0.0% 1.00x (?)
SuffixAnySequenceLazy 25412 25413 +0.0% 1.00x (?)
SuffixCountableRange 119 119 +0.0% 1.00x
SuffixCountableRangeLazy 14111 14101 -0.1% 1.00x (?)
SuffixSequence 25320 25306 -0.1% 1.00x (?)
SuffixSequenceLazy 25424 25858 +1.7% 0.98x (?)
SumUsingReduce 155193 155192 -0.0% 1.00x (?)
SumUsingReduceInto 149274 149313 +0.0% 1.00x (?)
SuperChars 96870 96859 -0.0% 1.00x (?)
TwoSum 3445 3446 +0.0% 1.00x (?)
TypeFlood 204 203 -0.5% 1.00x (?)
UTF8Decode 29979 29972 -0.0% 1.00x (?)
UTF8Decode_InitDecoding 1416 1409 -0.5% 1.00x (?)
UTF8Decode_InitDecoding_ascii 897 877 -2.2% 1.02x (?)
UTF8Decode_InitFromBytes 1192 1180 -1.0% 1.01x (?)
UTF8Decode_InitFromData 1266 1293 +2.1% 0.98x (?)
Walsh 12578 12573 -0.0% 1.00x (?)
WordCountHistogramASCII 36621 36626 +0.0% 1.00x (?)
WordCountHistogramUTF16 42000 41882 -0.3% 1.00x (?)
WordCountUniqueASCII 6936 6930 -0.1% 1.00x (?)
WordCountUniqueUTF16 9621 9513 -1.1% 1.01x (?)
WordSplitASCII 13504 13618 +0.8% 0.99x (?)
WordSplitUTF16 14664 14857 +1.3% 0.99x (?)
XorLoop 23798 23798 +0.0% 1.00x
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 38e0a47fb5281577596b89637b249bfd88ba7b29

Because people put all sorts of nonsense into @objc enums (most
reasonably, "private cases", which represent valid values that are not
API), the Swift-synthesized implementation of 'hash(into:)' needs to
not expect a switch statement to be exhaustive. And since
Swift-defined @objc enums are supposed to behave enough like C-defined
enums, they should at least handle simple method calls with an invalid
raw value, which means that 'rawValue' likewise should not use a
switch.

This patch provides alternate implementations that look like this:

extension ImportedEnum {
  public var rawValue: Int {
    return unsafeBitCast(self, to: Int.self)
  }

  public func hash(into hasher: inout Hasher) {
    hasher.combine(self.rawValue)
  }
}

rdar://problem/41913284
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

(still waiting for the source compat bots to come back online)

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 38e0a47fb5281577596b89637b249bfd88ba7b29

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ba964d7392f38f053b154325b970a8ef60875ae8

@jrose-apple
Copy link
Contributor Author

swiftlang/swift-source-compat-suite#213
@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

Remaining source compat failures match the failures on master. Merging.

@jrose-apple jrose-apple merged commit 357c7d6 into swiftlang:master Jul 11, 2018
@jrose-apple jrose-apple deleted the ready-for-anything branch July 11, 2018 15:44
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jul 11, 2018
…wiftlang#17836)

Because people put all sorts of nonsense into @objc enums (most
reasonably, "private cases", which represent valid values that are not
API), the Swift-synthesized implementation of 'hash(into:)' needs to
not expect a switch statement to be exhaustive. And since
Swift-defined @objc enums are supposed to behave enough like C-defined
enums, they should at least handle simple method calls with an invalid
raw value, which means that 'rawValue' likewise should not use a
switch.

This patch provides alternate implementations that look like this:

extension ImportedEnum {
  public var rawValue: Int {
    return unsafeBitCast(self, to: Int.self)
  }

  public func hash(into hasher: inout Hasher) {
    hasher.combine(self.rawValue)
  }
}

rdar://problem/41913284
(cherry picked from commit 357c7d6)
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.

5 participants