Skip to content

[stdlib] Fix a data race with _swiftEmptyArrayStorage's count #14778

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
Feb 22, 2018
Merged

[stdlib] Fix a data race with _swiftEmptyArrayStorage's count #14778

merged 1 commit into from
Feb 22, 2018

Conversation

lancep
Copy link
Contributor

@lancep lancep commented Feb 21, 2018

Dave's analysis in the bug below:

This new zero is getting written over the existing zero after we’ve moved all zero of the zero elements in the empty array buffer into the new buffer, so they won’t be destroyed twice (* zero == zero) . We should just skip this whole part if the source buffer is empty.

rdar://problem/31378400

@lancep
Copy link
Contributor Author

lancep commented Feb 21, 2018

@swift-ci please test

@lancep
Copy link
Contributor Author

lancep commented Feb 21, 2018

@swift-ci please smoke benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (4)
TEST OLD NEW DELTA SPEEDUP
DropLastCountableRange 11 12 +9.1% 0.92x
WordCountHistogramUTF16 23131 25109 +8.6% 0.92x (?)
StringBuilderLong 1135 1216 +7.1% 0.93x (?)
BitCount 200 211 +5.5% 0.95x
Improvement (7)
TEST OLD NEW DELTA SPEEDUP
StringWordBuilderReservingCapacity 1410 1272 -9.8% 1.11x
StringWordBuilder 1890 1707 -9.7% 1.11x
ObjectiveCBridgeFromNSArrayAnyObjectForced 4277 3983 -6.9% 1.07x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 35903 33564 -6.5% 1.07x
ClassArrayGetter 16 15 -6.2% 1.07x
ObjectiveCBridgeFromNSArrayAnyObject 21232 20096 -5.4% 1.06x (?)
BinaryFloatingPointConversionFromBinaryInteger 40 38 -5.0% 1.05x
No Changes (367)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3630 3626 -0.1% 1.00x (?)
AnyHashableWithAClass 70693 70791 +0.1% 1.00x (?)
Array2D 2550 2556 +0.2% 1.00x (?)
ArrayAppend 1025 1022 -0.3% 1.00x (?)
ArrayAppendArrayOfInt 804 804 +0.0% 1.00x
ArrayAppendAscii 13342 13290 -0.4% 1.00x
ArrayAppendFromGeneric 798 802 +0.5% 1.00x (?)
ArrayAppendGenericStructs 1431 1436 +0.3% 1.00x (?)
ArrayAppendLatin1 37912 37762 -0.4% 1.00x
ArrayAppendLazyMap 1344 1344 +0.0% 1.00x
ArrayAppendOptionals 1415 1431 +1.1% 0.99x (?)
ArrayAppendRepeatCol 1342 1339 -0.2% 1.00x (?)
ArrayAppendReserved 753 755 +0.3% 1.00x (?)
ArrayAppendSequence 1136 1136 +0.0% 1.00x
ArrayAppendStrings 15234 15177 -0.4% 1.00x (?)
ArrayAppendToFromGeneric 800 798 -0.2% 1.00x (?)
ArrayAppendToGeneric 799 798 -0.1% 1.00x (?)
ArrayAppendUTF16 37454 36256 -3.2% 1.03x
ArrayInClass 85 86 +1.2% 0.99x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 150 151 +0.7% 0.99x
ArrayOfGenericRef 4373 4367 -0.1% 1.00x (?)
ArrayOfPOD 183 184 +0.5% 0.99x
ArrayOfRef 4496 4505 +0.2% 1.00x
ArrayPlusEqualArrayOfInt 796 797 +0.1% 1.00x (?)
ArrayPlusEqualFiveElementCollection 5531 5513 -0.3% 1.00x (?)
ArrayPlusEqualSingleElementCollection 1022 1023 +0.1% 1.00x (?)
ArrayPlusEqualThreeElements 1655 1659 +0.2% 1.00x (?)
ArraySubscript 1534 1530 -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
ByteSwap 98 101 +3.1% 0.97x
COWTree 5364 5363 -0.0% 1.00x (?)
CSVParsing 757788 759032 +0.2% 1.00x (?)
CSVParsingAlt 725859 724934 -0.1% 1.00x (?)
CSVParsingAltIndices 355928 355438 -0.1% 1.00x (?)
CStringLongAscii 4769 4771 +0.0% 1.00x (?)
CStringLongNonAscii 2080 2162 +3.9% 0.96x
CStringShortAscii 4759 4716 -0.9% 1.01x
Calculator 638 653 +2.4% 0.98x
CaptureProp 3881 3906 +0.6% 0.99x
CharIndexing_ascii_unicodeScalars 14761 14747 -0.1% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 14120 14467 +2.5% 0.98x
CharIndexing_chinese_unicodeScalars 11196 11172 -0.2% 1.00x
CharIndexing_chinese_unicodeScalars_Backwards 10700 10964 +2.5% 0.98x
CharIndexing_japanese_unicodeScalars 17657 17651 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 16892 17325 +2.6% 0.98x
CharIndexing_korean_unicodeScalars 14303 14296 -0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 13702 14037 +2.4% 0.98x
CharIndexing_punctuatedJapanese_unicodeScalars 2689 2684 -0.2% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2579 2635 +2.2% 0.98x
CharIndexing_punctuated_unicodeScalars 3362 3357 -0.1% 1.00x
CharIndexing_punctuated_unicodeScalars_Backwards 3221 3289 +2.1% 0.98x
CharIndexing_russian_unicodeScalars 12299 12291 -0.1% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 11774 12059 +2.4% 0.98x
CharIndexing_tweet_unicodeScalars 29061 29076 +0.1% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 28507 28546 +0.1% 1.00x (?)
CharIndexing_utf16_unicodeScalars 20282 20227 -0.3% 1.00x
CharIndexing_utf16_unicodeScalars_Backwards 20974 21074 +0.5% 1.00x (?)
CharIteration_ascii_unicodeScalars 20945 21469 +2.5% 0.98x
CharIteration_ascii_unicodeScalars_Backwards 12692 12703 +0.1% 1.00x
CharIteration_chinese_unicodeScalars 15846 16334 +3.1% 0.97x
CharIteration_chinese_unicodeScalars_Backwards 9622 9644 +0.2% 1.00x
CharIteration_japanese_unicodeScalars 25071 25781 +2.8% 0.97x
CharIteration_japanese_unicodeScalars_Backwards 15214 15185 -0.2% 1.00x (?)
CharIteration_korean_unicodeScalars 20293 20838 +2.7% 0.97x
CharIteration_korean_unicodeScalars_Backwards 12319 12336 +0.1% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars 3743 3832 +2.4% 0.98x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2335 2341 +0.3% 1.00x (?)
CharIteration_punctuated_unicodeScalars 4704 4812 +2.3% 0.98x
CharIteration_punctuated_unicodeScalars_Backwards 2909 2924 +0.5% 0.99x
CharIteration_russian_unicodeScalars 17417 17889 +2.7% 0.97x
CharIteration_russian_unicodeScalars_Backwards 10589 10600 +0.1% 1.00x
CharIteration_tweet_unicodeScalars 41512 42512 +2.4% 0.98x
CharIteration_tweet_unicodeScalars_Backwards 25060 25041 -0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars 27440 27494 +0.2% 1.00x
CharIteration_utf16_unicodeScalars_Backwards 15822 15832 +0.1% 1.00x (?)
CharacterLiteralsLarge 5965 5936 -0.5% 1.00x (?)
CharacterLiteralsSmall 412 410 -0.5% 1.00x
CharacterPropertiesFetch 4629 4635 +0.1% 1.00x (?)
CharacterPropertiesPrecomputed 971 979 +0.8% 0.99x (?)
CharacterPropertiesStashed 1528 1522 -0.4% 1.00x (?)
CharacterPropertiesStashedMemo 1538 1523 -1.0% 1.01x
Chars 999 968 -3.1% 1.03x
Combos 469 452 -3.6% 1.04x (?)
DictOfArraysToArrayOfDicts 795 791 -0.5% 1.01x (?)
Dictionary 502 508 +1.2% 0.99x
Dictionary2 1623 1626 +0.2% 1.00x (?)
Dictionary2OfObjects 2979 2973 -0.2% 1.00x (?)
Dictionary3 237 241 +1.7% 0.98x (?)
Dictionary3OfObjects 673 673 +0.0% 1.00x
Dictionary4 147 147 +0.0% 1.00x
Dictionary4OfObjects 203 203 +0.0% 1.00x
DictionaryBridge 2014 2058 +2.2% 0.98x (?)
DictionaryGroup 133 133 +0.0% 1.00x
DictionaryGroupOfObjects 1925 1928 +0.2% 1.00x
DictionaryLiteral 1593 1588 -0.3% 1.00x (?)
DictionaryOfObjects 2173 2177 +0.2% 1.00x (?)
DictionaryRemove 2722 2730 +0.3% 1.00x (?)
DictionaryRemoveOfObjects 23945 23959 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutation 142 142 +0.0% 1.00x
DictionarySubscriptDefaultMutationArray 490 490 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 3825 3853 +0.7% 0.99x (?)
DictionarySubscriptDefaultMutationOfObjects 1431 1421 -0.7% 1.01x (?)
DictionarySwap 468 468 +0.0% 1.00x
DictionarySwapOfObjects 7495 7436 -0.8% 1.01x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 102 102 +0.0% 1.00x
DropFirstAnyCollectionLazy 64679 64825 +0.2% 1.00x (?)
DropFirstAnySeqCRangeIter 18037 18064 +0.1% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 18033 18039 +0.0% 1.00x (?)
DropFirstAnySeqCntRange 94 94 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 93 94 +1.1% 0.99x
DropFirstAnySequence 4340 4370 +0.7% 0.99x
DropFirstAnySequenceLazy 4336 4379 +1.0% 0.99x
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 2698 2700 +0.1% 1.00x (?)
DropFirstSequenceLazy 2792 2792 +0.0% 1.00x
DropLastAnyCollection 38 37 -2.6% 1.03x
DropLastAnyCollectionLazy 21717 21776 +0.3% 1.00x (?)
DropLastAnySeqCRangeIter 3796 3790 -0.2% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3794 3786 -0.2% 1.00x (?)
DropLastAnySeqCntRange 30 30 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 29 29 +0.0% 1.00x
DropLastAnySequence 5127 5116 -0.2% 1.00x (?)
DropLastAnySequenceLazy 5228 5218 -0.2% 1.00x
DropLastCountableRangeLazy 11 11 +0.0% 1.00x
DropLastSequence 683 684 +0.1% 1.00x
DropLastSequenceLazy 683 682 -0.1% 1.00x (?)
DropWhileAnyCollection 125 126 +0.8% 0.99x (?)
DropWhileAnyCollectionLazy 166 166 +0.0% 1.00x
DropWhileAnySeqCRangeIter 14754 14813 +0.4% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 166 166 +0.0% 1.00x
DropWhileAnySeqCntRange 118 118 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 166 166 +0.0% 1.00x
DropWhileAnySequence 4750 4750 +0.0% 1.00x
DropWhileAnySequenceLazy 1857 1856 -0.1% 1.00x (?)
DropWhileArrayLazy 129 129 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 111 111 +0.0% 1.00x
DropWhileSequence 1343 1343 +0.0% 1.00x
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 49 48 -2.0% 1.02x
EqualSubstringString 49 48 -2.0% 1.02x
EqualSubstringSubstring 49 48 -2.0% 1.02x
EqualSubstringSubstringGenericEquatable 49 48 -2.0% 1.02x
ErrorHandling 2324 2353 +1.2% 0.99x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1336 1328 -0.6% 1.01x (?)
FilterEvenUsingReduceInto 149 148 -0.7% 1.01x (?)
FrequenciesUsingReduce 6761 6689 -1.1% 1.01x
FrequenciesUsingReduceInto 3132 3120 -0.4% 1.00x
Hanoi 3640 3652 +0.3% 1.00x (?)
HashTest 1770 1772 +0.1% 1.00x (?)
Histogram 321 321 +0.0% 1.00x
Integrate 217 218 +0.5% 1.00x
IterateData 1305 1311 +0.5% 1.00x
Join 376 374 -0.5% 1.01x
LazilyFilteredArrayContains 36659 36708 +0.1% 1.00x (?)
LazilyFilteredArrays 65042 64976 -0.1% 1.00x (?)
LazilyFilteredRange 3988 3829 -4.0% 1.04x
LessSubstringSubstring 49 48 -2.0% 1.02x
LessSubstringSubstringGenericComparable 49 48 -2.0% 1.02x
LinkedList 7529 7544 +0.2% 1.00x
LuhnAlgoEager 582 582 +0.0% 1.00x
LuhnAlgoLazy 583 581 -0.3% 1.00x
MapReduce 399 399 +0.0% 1.00x
MapReduceAnyCollection 400 401 +0.2% 1.00x (?)
MapReduceAnyCollectionShort 2248 2265 +0.8% 0.99x
MapReduceClass 3025 3027 +0.1% 1.00x (?)
MapReduceClassShort 4576 4609 +0.7% 0.99x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazyCollectionShort 34 34 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 462 465 +0.6% 0.99x
MapReduceShort 2039 2034 -0.2% 1.00x (?)
MapReduceShortString 21 21 +0.0% 1.00x
MapReduceString 81 81 +0.0% 1.00x
Memset 217 218 +0.5% 1.00x (?)
MonteCarloE 10553 10345 -2.0% 1.02x
MonteCarloPi 42814 42994 +0.4% 1.00x
NSDictionaryCastToSwift 5516 5439 -1.4% 1.01x (?)
NSError 300 301 +0.3% 1.00x (?)
NSStringConversion 283 290 +2.5% 0.98x
NibbleSort 3961 3957 -0.1% 1.00x (?)
NopDeinit 21608 21585 -0.1% 1.00x (?)
ObjectAllocation 187 185 -1.1% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 39578 37892 -4.3% 1.04x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 121413 120325 -0.9% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 63063 61725 -2.1% 1.02x
ObjectiveCBridgeFromNSSetAnyObjectForced 4215 4318 +2.4% 0.98x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 69900 68831 -1.5% 1.02x (?)
ObjectiveCBridgeFromNSString 1301 1334 +2.5% 0.98x (?)
ObjectiveCBridgeFromNSStringForced 2440 2430 -0.4% 1.00x (?)
ObjectiveCBridgeStubDataAppend 3922 4120 +5.0% 0.95x (?)
ObjectiveCBridgeStubDateMutation 257 258 +0.4% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 26509 25954 -2.1% 1.02x (?)
ObjectiveCBridgeStubFromNSDate 4189 4188 -0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSString 861 849 -1.4% 1.01x
ObjectiveCBridgeStubFromNSStringRef 161 162 +0.6% 0.99x
ObjectiveCBridgeStubNSDataAppend 2629 2640 +0.4% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 13397 13881 +3.6% 0.97x
ObjectiveCBridgeStubToArrayOfNSString 28650 29928 +4.5% 0.96x
ObjectiveCBridgeStubToNSDate 15299 15320 +0.1% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3445 3452 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSString 1553 1559 +0.4% 1.00x
ObjectiveCBridgeStubToNSStringRef 115 116 +0.9% 0.99x
ObjectiveCBridgeStubURLAppendPath 331530 327453 -1.2% 1.01x (?)
ObjectiveCBridgeStubURLAppendPathRef 335423 326567 -2.6% 1.03x (?)
ObjectiveCBridgeToNSArray 29448 29621 +0.6% 0.99x (?)
ObjectiveCBridgeToNSDictionary 50200 52469 +4.5% 0.96x (?)
ObjectiveCBridgeToNSSet 42592 40658 -4.5% 1.05x
ObjectiveCBridgeToNSString 1286 1282 -0.3% 1.00x (?)
ObserverClosure 2168 2161 -0.3% 1.00x (?)
ObserverForwarderStruct 1000 1003 +0.3% 1.00x (?)
ObserverPartiallyAppliedMethod 3745 3773 +0.7% 0.99x (?)
ObserverUnappliedMethod 2376 2368 -0.3% 1.00x (?)
OpenClose 128 126 -1.6% 1.02x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 3857 3849 -0.2% 1.00x
PointerArithmetics 34369 34364 -0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1938 1859 -4.1% 1.04x (?)
PopFrontArrayGeneric 1958 1957 -0.1% 1.00x (?)
PopFrontUnsafePointer 9621 9374 -2.6% 1.03x (?)
PrefixAnyCollection 102 102 +0.0% 1.00x
PrefixAnyCollectionLazy 65204 65688 +0.7% 0.99x (?)
PrefixAnySeqCRangeIter 14148 14056 -0.7% 1.01x (?)
PrefixAnySeqCRangeIterLazy 14164 14069 -0.7% 1.01x
PrefixAnySeqCntRange 94 94 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 94 94 +0.0% 1.00x
PrefixAnySequence 3833 3853 +0.5% 0.99x
PrefixAnySequenceLazy 3835 3848 +0.3% 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 1325 1325 +0.0% 1.00x
PrefixSequenceLazy 1414 1415 +0.1% 1.00x
PrefixWhileAnyCollection 173 172 -0.6% 1.01x
PrefixWhileAnyCollectionLazy 108 108 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 9351 9331 -0.2% 1.00x
PrefixWhileAnySeqCRangeIterLazy 90 90 +0.0% 1.00x
PrefixWhileAnySeqCntRange 165 165 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 108 108 +0.0% 1.00x
PrefixWhileAnySequence 10490 10503 +0.1% 1.00x (?)
PrefixWhileAnySequenceLazy 1394 1394 +0.0% 1.00x
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 53 53 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 380 381 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 755 749 -0.8% 1.01x
PrimsSplit 756 753 -0.4% 1.00x (?)
QueueConcrete 1310 1307 -0.2% 1.00x (?)
QueueGeneric 1158 1159 +0.1% 1.00x (?)
RC4 171 171 +0.0% 1.00x
RGBHistogram 2199 2227 +1.3% 0.99x (?)
RGBHistogramOfObjects 23994 23754 -1.0% 1.01x
RangeAssignment 354 352 -0.6% 1.01x
RangeIterationSigned 171 171 +0.0% 1.00x
RangeIterationSigned64 200 200 +0.0% 1.00x
RangeIterationUnsigned 200 200 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 992 982 -1.0% 1.01x
RecursiveOwnedParameter 2377 2350 -1.1% 1.01x (?)
RemoveWhereFilterInts 45 45 +0.0% 1.00x
RemoveWhereFilterString 309 304 -1.6% 1.02x
RemoveWhereFilterStrings 433 433 +0.0% 1.00x
RemoveWhereMoveInts 17 17 +0.0% 1.00x
RemoveWhereMoveStrings 519 520 +0.2% 1.00x
RemoveWhereQuadraticInts 1288 1286 -0.2% 1.00x
RemoveWhereQuadraticString 198 203 +2.5% 0.98x (?)
RemoveWhereQuadraticStrings 2756 2756 +0.0% 1.00x
RemoveWhereSwapInts 19 19 +0.0% 1.00x
RemoveWhereSwapStrings 849 849 +0.0% 1.00x
ReversedArray 57 58 +1.8% 0.98x
ReversedBidirectional 17118 17145 +0.2% 1.00x (?)
ReversedDictionary 134 135 +0.7% 0.99x (?)
RomanNumbers 115066 114689 -0.3% 1.00x (?)
SequenceAlgosAnySequence 10168 10124 -0.4% 1.00x
SequenceAlgosArray 1579 1581 +0.1% 1.00x (?)
SequenceAlgosContiguousArray 1586 1580 -0.4% 1.00x (?)
SequenceAlgosList 1356 1353 -0.2% 1.00x
SequenceAlgosRange 4298 4300 +0.0% 1.00x (?)
SequenceAlgosUnfoldSequence 1079 1080 +0.1% 1.00x (?)
SetExclusiveOr 3473 3381 -2.6% 1.03x
SetExclusiveOr_OfObjects 8716 8899 +2.1% 0.98x
SetIntersect 320 318 -0.6% 1.01x
SetIntersect_OfObjects 1763 1762 -0.1% 1.00x (?)
SetIsSubsetOf 299 299 +0.0% 1.00x
SetIsSubsetOf_OfObjects 363 363 +0.0% 1.00x
SetUnion 3187 3075 -3.5% 1.04x
SetUnion_OfObjects 7248 7263 +0.2% 1.00x (?)
SevenBoom 1533 1524 -0.6% 1.01x
Sim2DArray 411 417 +1.5% 0.99x
SortLargeExistentials 6809 6787 -0.3% 1.00x
SortLettersInPlace 1124 1128 +0.4% 1.00x (?)
SortSortedStrings 1001 1000 -0.1% 1.00x (?)
SortStrings 1793 1793 +0.0% 1.00x
SortStringsUnicode 2580 2570 -0.4% 1.00x
StackPromo 22176 22170 -0.0% 1.00x (?)
StaticArray 5 5 +0.0% 1.00x
StrComplexWalk 1563 1564 +0.1% 1.00x
StrToInt 2231 2187 -2.0% 1.02x
StringAdder 4246 4229 -0.4% 1.00x (?)
StringBuilder 1392 1372 -1.4% 1.01x (?)
StringComparison_abnormal 740 743 +0.4% 1.00x (?)
StringComparison_ascii 1023 1024 +0.1% 1.00x (?)
StringComparison_emoji 803 814 +1.4% 0.99x
StringComparison_fastPrenormal 755 752 -0.4% 1.00x (?)
StringComparison_latin1 595 589 -1.0% 1.01x
StringComparison_longSharedPrefix 903 904 +0.1% 1.00x
StringComparison_nonBMPSlowestPrenormal 1579 1597 +1.1% 0.99x
StringComparison_slowerPrenormal 1667 1709 +2.5% 0.98x
StringComparison_zalgo 114864 115050 +0.2% 1.00x
StringEdits 119371 116700 -2.2% 1.02x (?)
StringEnumRawValueInitialization 989 989 +0.0% 1.00x
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 10 10 +0.0% 1.00x
StringHasPrefixAscii 1318 1317 -0.1% 1.00x (?)
StringHasPrefixUnicode 27525 27671 +0.5% 0.99x
StringHasSuffixAscii 1460 1461 +0.1% 1.00x (?)
StringHasSuffixUnicode 84651 84666 +0.0% 1.00x (?)
StringInterpolation 10923 10811 -1.0% 1.01x
StringMatch 8549 8347 -2.4% 1.02x
StringRemoveDupes 1196 1200 +0.3% 1.00x (?)
StringUTF16Builder 2357 2367 +0.4% 1.00x (?)
StringWalk 1578 1582 +0.3% 1.00x
StringWithCString 42590 42524 -0.2% 1.00x
SubstringComparable 41 41 +0.0% 1.00x
SubstringEqualString 525 528 +0.6% 0.99x (?)
SubstringEquatable 1340 1345 +0.4% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 69 69 +0.0% 1.00x
SuffixAnyCollection 43 43 +0.0% 1.00x
SuffixAnyCollectionLazy 21790 21663 -0.6% 1.01x (?)
SuffixAnySeqCRangeIter 3997 3997 +0.0% 1.00x
SuffixAnySeqCRangeIterLazy 3995 3999 +0.1% 1.00x
SuffixAnySeqCntRange 35 35 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 35 35 +0.0% 1.00x
SuffixAnySequence 5092 5111 +0.4% 1.00x
SuffixAnySequenceLazy 5215 5209 -0.1% 1.00x (?)
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixCountableRangeLazy 12 12 +0.0% 1.00x
SuffixSequence 3712 3708 -0.1% 1.00x (?)
SuffixSequenceLazy 3719 3738 +0.5% 0.99x
SumUsingReduce 96 96 +0.0% 1.00x
SumUsingReduceInto 96 96 +0.0% 1.00x
SuperChars 41251 41480 +0.6% 0.99x (?)
TwoSum 992 999 +0.7% 0.99x
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 327 327 +0.0% 1.00x
Walsh 404 405 +0.2% 1.00x (?)
WordCountHistogramASCII 7490 7501 +0.1% 1.00x (?)
WordCountUniqueASCII 1813 1802 -0.6% 1.01x (?)
WordCountUniqueUTF16 16297 16570 +1.7% 0.98x (?)
WordSplitASCII 21596 21193 -1.9% 1.02x (?)
WordSplitUTF16 23527 23291 -1.0% 1.01x (?)
XorLoop 394 395 +0.3% 1.00x

Unoptimized (Onone)

Regression (5)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeStubFromNSString 877 1104 +25.9% 0.79x (?)
SubstringEquatable 6004 6422 +7.0% 0.93x (?)
MapReduceShortString 229 243 +6.1% 0.94x (?)
CharIteration_utf16_unicodeScalars_Backwards 250422 263906 +5.4% 0.95x (?)
StringEdits 338705 356920 +5.4% 0.95x (?)
Improvement (5)
TEST OLD NEW DELTA SPEEDUP
WordCountUniqueUTF16 29128 25229 -13.4% 1.15x
NSDictionaryCastToSwift 8215 7158 -12.9% 1.15x
ErrorHandling 7369 6885 -6.6% 1.07x
DictionaryRemoveOfObjects 53393 50119 -6.1% 1.07x
ObjectiveCBridgeFromNSSetAnyObject 66542 63096 -5.2% 1.05x
No Changes (368)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 5076 5092 +0.3% 1.00x (?)
AnyHashableWithAClass 87256 87288 +0.0% 1.00x (?)
Array2D 634332 630480 -0.6% 1.01x
ArrayAppend 4681 4683 +0.0% 1.00x (?)
ArrayAppendArrayOfInt 863 861 -0.2% 1.00x (?)
ArrayAppendAscii 40092 39975 -0.3% 1.00x
ArrayAppendFromGeneric 865 864 -0.1% 1.00x (?)
ArrayAppendGenericStructs 1496 1499 +0.2% 1.00x (?)
ArrayAppendLatin1 62865 63311 +0.7% 0.99x (?)
ArrayAppendLazyMap 167898 167587 -0.2% 1.00x (?)
ArrayAppendOptionals 1502 1504 +0.1% 1.00x (?)
ArrayAppendRepeatCol 173377 172581 -0.5% 1.00x (?)
ArrayAppendReserved 4408 4411 +0.1% 1.00x (?)
ArrayAppendSequence 141298 143293 +1.4% 0.99x
ArrayAppendStrings 15332 15326 -0.0% 1.00x (?)
ArrayAppendToFromGeneric 864 865 +0.1% 1.00x (?)
ArrayAppendToGeneric 867 863 -0.5% 1.00x (?)
ArrayAppendUTF16 62673 62864 +0.3% 1.00x (?)
ArrayInClass 6267 6259 -0.1% 1.00x
ArrayLiteral 1811 1813 +0.1% 1.00x (?)
ArrayOfGenericPOD2 1130 1129 -0.1% 1.00x (?)
ArrayOfGenericRef 10087 10129 +0.4% 1.00x (?)
ArrayOfPOD 758 758 +0.0% 1.00x
ArrayOfRef 9304 9312 +0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 862 863 +0.1% 1.00x
ArrayPlusEqualFiveElementCollection 234608 238982 +1.9% 0.98x
ArrayPlusEqualSingleElementCollection 229816 230058 +0.1% 1.00x (?)
ArrayPlusEqualThreeElements 9231 9237 +0.1% 1.00x (?)
ArraySubscript 116397 115699 -0.6% 1.01x
ArrayValueProp 3624 3622 -0.1% 1.00x (?)
ArrayValueProp2 16345 16231 -0.7% 1.01x (?)
ArrayValueProp3 4133 4140 +0.2% 1.00x (?)
ArrayValueProp4 4152 4133 -0.5% 1.00x (?)
BinaryFloatingPointConversionFromBinaryInteger 5998 6054 +0.9% 0.99x (?)
BitCount 7659 7663 +0.1% 1.00x (?)
ByteSwap 9221 9239 +0.2% 1.00x
COWTree 11345 11229 -1.0% 1.01x (?)
CSVParsing 2470501 2502850 +1.3% 0.99x (?)
CSVParsingAlt 1340406 1351831 +0.9% 0.99x (?)
CSVParsingAltIndices 2371700 2430051 +2.5% 0.98x (?)
CStringLongAscii 4683 4840 +3.4% 0.97x
CStringLongNonAscii 2105 2175 +3.3% 0.97x
CStringShortAscii 7869 7846 -0.3% 1.00x (?)
Calculator 1557 1513 -2.8% 1.03x
CaptureProp 245941 243983 -0.8% 1.01x
CharIndexing_ascii_unicodeScalars 368798 358277 -2.9% 1.03x (?)
CharIndexing_ascii_unicodeScalars_Backwards 385619 384751 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars 273599 268831 -1.7% 1.02x (?)
CharIndexing_chinese_unicodeScalars_Backwards 291255 288010 -1.1% 1.01x (?)
CharIndexing_japanese_unicodeScalars 435307 429363 -1.4% 1.01x
CharIndexing_japanese_unicodeScalars_Backwards 468640 464519 -0.9% 1.01x
CharIndexing_korean_unicodeScalars 353203 343236 -2.8% 1.03x
CharIndexing_korean_unicodeScalars_Backwards 375384 371501 -1.0% 1.01x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 64049 62906 -1.8% 1.02x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 66570 66257 -0.5% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 80175 79451 -0.9% 1.01x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 85926 85531 -0.5% 1.00x (?)
CharIndexing_russian_unicodeScalars 301185 295640 -1.8% 1.02x
CharIndexing_russian_unicodeScalars_Backwards 322986 318357 -1.4% 1.01x (?)
CharIndexing_tweet_unicodeScalars 721304 703476 -2.5% 1.03x
CharIndexing_tweet_unicodeScalars_Backwards 767592 761592 -0.8% 1.01x (?)
CharIndexing_utf16_unicodeScalars 310317 303815 -2.1% 1.02x
CharIndexing_utf16_unicodeScalars_Backwards 323027 322519 -0.2% 1.00x (?)
CharIteration_ascii_unicodeScalars 153930 152908 -0.7% 1.01x
CharIteration_ascii_unicodeScalars_Backwards 292883 290254 -0.9% 1.01x (?)
CharIteration_chinese_unicodeScalars 116541 115664 -0.8% 1.01x (?)
CharIteration_chinese_unicodeScalars_Backwards 222526 221919 -0.3% 1.00x (?)
CharIteration_japanese_unicodeScalars 184318 182973 -0.7% 1.01x (?)
CharIteration_japanese_unicodeScalars_Backwards 349930 348896 -0.3% 1.00x (?)
CharIteration_korean_unicodeScalars 149516 148235 -0.9% 1.01x
CharIteration_korean_unicodeScalars_Backwards 285288 281774 -1.2% 1.01x (?)
CharIteration_punctuatedJapanese_unicodeScalars 27575 27562 -0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 50808 51543 +1.4% 0.99x (?)
CharIteration_punctuated_unicodeScalars 34587 34375 -0.6% 1.01x
CharIteration_punctuated_unicodeScalars_Backwards 64773 65181 +0.6% 0.99x (?)
CharIteration_russian_unicodeScalars 132085 127462 -3.5% 1.04x
CharIteration_russian_unicodeScalars_Backwards 243823 241855 -0.8% 1.01x (?)
CharIteration_tweet_unicodeScalars 312148 301597 -3.4% 1.03x
CharIteration_tweet_unicodeScalars_Backwards 577550 575999 -0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars 135325 129687 -4.2% 1.04x
CharacterLiteralsLarge 5897 5862 -0.6% 1.01x (?)
CharacterLiteralsSmall 695 671 -3.5% 1.04x
CharacterPropertiesFetch 5488 5627 +2.5% 0.98x (?)
CharacterPropertiesPrecomputed 4326 4331 +0.1% 1.00x (?)
CharacterPropertiesStashed 2384 2407 +1.0% 0.99x (?)
CharacterPropertiesStashedMemo 4903 5135 +4.7% 0.95x
Chars 39478 39520 +0.1% 1.00x (?)
ClassArrayGetter 991 989 -0.2% 1.00x (?)
Combos 1958 2025 +3.4% 0.97x (?)
DictOfArraysToArrayOfDicts 3334 3327 -0.2% 1.00x (?)
Dictionary 2783 2788 +0.2% 1.00x (?)
Dictionary2 3038 3031 -0.2% 1.00x (?)
Dictionary2OfObjects 5582 5639 +1.0% 0.99x (?)
Dictionary3 1327 1321 -0.5% 1.00x (?)
Dictionary3OfObjects 2261 2287 +1.1% 0.99x (?)
Dictionary4 1183 1191 +0.7% 0.99x (?)
Dictionary4OfObjects 1826 1830 +0.2% 1.00x (?)
DictionaryBridge 2142 2193 +2.4% 0.98x (?)
DictionaryGroup 4121 4121 +0.0% 1.00x
DictionaryGroupOfObjects 7434 7392 -0.6% 1.01x (?)
DictionaryLiteral 8642 8635 -0.1% 1.00x (?)
DictionaryOfObjects 6234 6503 +4.3% 0.96x (?)
DictionaryRemove 18106 18205 +0.5% 0.99x
DictionarySubscriptDefaultMutation 2057 2060 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2325 2350 +1.1% 0.99x
DictionarySubscriptDefaultMutationArrayOfObjects 9196 9217 +0.2% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 5723 5876 +2.7% 0.97x (?)
DictionarySwap 5261 5263 +0.0% 1.00x (?)
DictionarySwapOfObjects 22572 22645 +0.3% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 13628 13593 -0.3% 1.00x
DropFirstAnyCollectionLazy 98102 99150 +1.1% 0.99x (?)
DropFirstAnySeqCRangeIter 20289 20296 +0.0% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 20350 20326 -0.1% 1.00x
DropFirstAnySeqCntRange 13579 13577 -0.0% 1.00x (?)
DropFirstAnySeqCntRangeLazy 13737 13642 -0.7% 1.01x
DropFirstAnySequence 10662 10771 +1.0% 0.99x
DropFirstAnySequenceLazy 10769 10812 +0.4% 1.00x
DropFirstArray 3821 3819 -0.1% 1.00x (?)
DropFirstArrayLazy 25727 25691 -0.1% 1.00x (?)
DropFirstCountableRange 325 325 +0.0% 1.00x
DropFirstCountableRangeLazy 25799 25758 -0.2% 1.00x (?)
DropFirstSequence 10426 10439 +0.1% 1.00x
DropFirstSequenceLazy 10358 10413 +0.5% 0.99x (?)
DropLastAnyCollection 4557 4553 -0.1% 1.00x
DropLastAnyCollectionLazy 33575 32142 -4.3% 1.04x (?)
DropLastAnySeqCRangeIter 37334 37318 -0.0% 1.00x (?)
DropLastAnySeqCRangeIterLazy 37248 37213 -0.1% 1.00x (?)
DropLastAnySeqCntRange 4542 4543 +0.0% 1.00x (?)
DropLastAnySeqCntRangeLazy 4575 4571 -0.1% 1.00x (?)
DropLastAnySequence 28740 28757 +0.1% 1.00x (?)
DropLastAnySequenceLazy 28712 28744 +0.1% 1.00x (?)
DropLastCountableRange 112 113 +0.9% 0.99x
DropLastCountableRangeLazy 8593 8588 -0.1% 1.00x (?)
DropLastSequence 28871 28754 -0.4% 1.00x (?)
DropLastSequenceLazy 28626 28715 +0.3% 1.00x
DropWhileAnyCollection 17123 17121 -0.0% 1.00x (?)
DropWhileAnyCollectionLazy 18838 18810 -0.1% 1.00x (?)
DropWhileAnySeqCRangeIter 21645 21655 +0.0% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 18910 18862 -0.3% 1.00x
DropWhileAnySeqCntRange 17065 17072 +0.0% 1.00x (?)
DropWhileAnySeqCntRangeLazy 18910 18884 -0.1% 1.00x (?)
DropWhileAnySequence 12157 12124 -0.3% 1.00x (?)
DropWhileAnySequenceLazy 10105 10139 +0.3% 1.00x (?)
DropWhileArrayLazy 13670 13636 -0.2% 1.00x
DropWhileCountableRange 3919 3935 +0.4% 1.00x
DropWhileCountableRangeLazy 18406 18366 -0.2% 1.00x
DropWhileSequence 11828 11890 +0.5% 0.99x
DropWhileSequenceLazy 9746 9770 +0.2% 1.00x
EqualStringSubstring 92 91 -1.1% 1.01x
EqualSubstringString 92 91 -1.1% 1.01x
EqualSubstringSubstring 93 92 -1.1% 1.01x
EqualSubstringSubstringGenericEquatable 98 98 +0.0% 1.00x
ExclusivityGlobal 186 186 +0.0% 1.00x
ExclusivityIndependent 69 69 +0.0% 1.00x
FilterEvenUsingReduce 3621 3612 -0.2% 1.00x (?)
FilterEvenUsingReduceInto 1918 1921 +0.2% 1.00x (?)
FrequenciesUsingReduce 10500 10545 +0.4% 1.00x (?)
FrequenciesUsingReduceInto 5360 5322 -0.7% 1.01x (?)
Hanoi 20107 20088 -0.1% 1.00x (?)
HashTest 21888 21712 -0.8% 1.01x (?)
Histogram 6497 6506 +0.1% 1.00x (?)
Integrate 841 851 +1.2% 0.99x (?)
IterateData 5816 5848 +0.6% 0.99x
Join 1105 1101 -0.4% 1.00x (?)
LazilyFilteredArrayContains 793822 795913 +0.3% 1.00x
LazilyFilteredArrays 1454676 1455248 +0.0% 1.00x (?)
LazilyFilteredRange 466366 467569 +0.3% 1.00x (?)
LessSubstringSubstring 93 91 -2.2% 1.02x
LessSubstringSubstringGenericComparable 97 97 +0.0% 1.00x
LinkedList 32420 32450 +0.1% 1.00x (?)
LuhnAlgoEager 4861 4997 +2.8% 0.97x (?)
LuhnAlgoLazy 4854 4879 +0.5% 0.99x (?)
MapReduce 25412 25485 +0.3% 1.00x (?)
MapReduceAnyCollection 25337 25516 +0.7% 0.99x (?)
MapReduceAnyCollectionShort 37195 36316 -2.4% 1.02x (?)
MapReduceClass 30149 30173 +0.1% 1.00x (?)
MapReduceClassShort 40370 41138 +1.9% 0.98x (?)
MapReduceLazyCollection 22316 22315 -0.0% 1.00x (?)
MapReduceLazyCollectionShort 34007 34064 +0.2% 1.00x (?)
MapReduceLazySequence 17315 17494 +1.0% 0.99x
MapReduceSequence 29224 29357 +0.5% 1.00x
MapReduceShort 36358 36349 -0.0% 1.00x (?)
MapReduceString 1801 1803 +0.1% 1.00x (?)
Memset 44743 44743 +0.0% 1.00x
MonteCarloE 1233619 1232001 -0.1% 1.00x
MonteCarloPi 5605398 5593691 -0.2% 1.00x
NSError 728 704 -3.3% 1.03x
NSStringConversion 329 338 +2.7% 0.97x
NibbleSort 412896 413041 +0.0% 1.00x (?)
NopDeinit 170922 171419 +0.3% 1.00x (?)
ObjectAllocation 1345 1349 +0.3% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 22429 22756 +1.5% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 9208 9213 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 40503 41829 +3.3% 0.97x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 37290 36849 -1.2% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 133443 127893 -4.2% 1.04x
ObjectiveCBridgeFromNSSetAnyObjectForced 6945 6728 -3.1% 1.03x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 72106 74698 +3.6% 0.97x (?)
ObjectiveCBridgeFromNSString 3128 3116 -0.4% 1.00x
ObjectiveCBridgeFromNSStringForced 2776 2750 -0.9% 1.01x (?)
ObjectiveCBridgeStubDataAppend 4378 4372 -0.1% 1.00x (?)
ObjectiveCBridgeStubDateMutation 630 630 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 26398 26386 -0.0% 1.00x (?)
ObjectiveCBridgeStubFromNSDate 4883 4883 +0.0% 1.00x
ObjectiveCBridgeStubFromNSStringRef 196 196 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2904 2919 +0.5% 0.99x (?)
ObjectiveCBridgeStubNSDateMutationRef 15788 15849 +0.4% 1.00x (?)
ObjectiveCBridgeStubToArrayOfNSString 29104 29044 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSDate 15908 15712 -1.2% 1.01x (?)
ObjectiveCBridgeStubToNSDateRef 3454 3490 +1.0% 0.99x
ObjectiveCBridgeStubToNSString 1574 1571 -0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 153 153 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 341311 345375 +1.2% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef 343376 337973 -1.6% 1.02x (?)
ObjectiveCBridgeToNSArray 29985 29965 -0.1% 1.00x (?)
ObjectiveCBridgeToNSDictionary 52252 53421 +2.2% 0.98x
ObjectiveCBridgeToNSSet 41436 42905 +3.5% 0.97x (?)
ObjectiveCBridgeToNSString 1347 1344 -0.2% 1.00x (?)
ObserverClosure 6423 6431 +0.1% 1.00x (?)
ObserverForwarderStruct 4418 4427 +0.2% 1.00x (?)
ObserverPartiallyAppliedMethod 7934 7919 -0.2% 1.00x (?)
ObserverUnappliedMethod 7901 7896 -0.1% 1.00x (?)
OpenClose 538 553 +2.8% 0.97x
PartialApplyDynamicType 41064 41334 +0.7% 0.99x (?)
Phonebook 20227 20318 +0.4% 1.00x
PointerArithmetics 117376 123109 +4.9% 0.95x
PolymorphicCalls 6489 6223 -4.1% 1.04x (?)
PopFrontArray 4641 4642 +0.0% 1.00x (?)
PopFrontArrayGeneric 5793 5787 -0.1% 1.00x (?)
PopFrontUnsafePointer 11198 11253 +0.5% 1.00x (?)
PrefixAnyCollection 13809 13830 +0.2% 1.00x (?)
PrefixAnyCollectionLazy 96243 94829 -1.5% 1.01x (?)
PrefixAnySeqCRangeIter 16324 16335 +0.1% 1.00x (?)
PrefixAnySeqCRangeIterLazy 16339 16328 -0.1% 1.00x (?)
PrefixAnySeqCntRange 13928 13833 -0.7% 1.01x
PrefixAnySeqCntRangeLazy 13686 13692 +0.0% 1.00x (?)
PrefixAnySequence 8947 9051 +1.2% 0.99x
PrefixAnySequenceLazy 8943 9024 +0.9% 0.99x
PrefixArray 3826 3818 -0.2% 1.00x
PrefixArrayLazy 25648 25778 +0.5% 0.99x
PrefixCountableRange 325 325 +0.0% 1.00x
PrefixCountableRangeLazy 25804 25749 -0.2% 1.00x
PrefixSequence 8704 8783 +0.9% 0.99x
PrefixSequenceLazy 8729 8780 +0.6% 0.99x
PrefixWhileAnyCollection 24260 24249 -0.0% 1.00x (?)
PrefixWhileAnyCollectionLazy 15657 15679 +0.1% 1.00x (?)
PrefixWhileAnySeqCRangeIter 32636 32383 -0.8% 1.01x
PrefixWhileAnySeqCRangeIterLazy 15855 15767 -0.6% 1.01x (?)
PrefixWhileAnySeqCntRange 24435 24253 -0.7% 1.01x (?)
PrefixWhileAnySeqCntRangeLazy 15756 15814 +0.4% 1.00x
PrefixWhileAnySequence 25848 25841 -0.0% 1.00x (?)
PrefixWhileAnySequenceLazy 9087 9129 +0.5% 1.00x
PrefixWhileArray 10676 10686 +0.1% 1.00x
PrefixWhileArrayLazy 11884 11895 +0.1% 1.00x (?)
PrefixWhileCountableRange 11067 11061 -0.1% 1.00x (?)
PrefixWhileCountableRangeLazy 15331 15352 +0.1% 1.00x (?)
PrefixWhileSequence 25783 25872 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 8820 8889 +0.8% 0.99x
Prims 9640 9705 +0.7% 0.99x (?)
PrimsSplit 9759 9618 -1.4% 1.01x (?)
QueueConcrete 14953 14921 -0.2% 1.00x
QueueGeneric 18899 18891 -0.0% 1.00x (?)
RC4 16736 16722 -0.1% 1.00x (?)
RGBHistogram 26130 25696 -1.7% 1.02x (?)
RGBHistogramOfObjects 99787 101210 +1.4% 0.99x (?)
RangeAssignment 2211 2228 +0.8% 0.99x (?)
RangeIterationSigned 16542 16727 +1.1% 0.99x
RangeIterationSigned64 38765 38854 +0.2% 1.00x (?)
RangeIterationUnsigned 34659 34775 +0.3% 1.00x (?)
RangeReplaceableCollectionPlusDefault 8323 8327 +0.0% 1.00x (?)
RecursiveOwnedParameter 7923 7916 -0.1% 1.00x (?)
RemoveWhereFilterInts 2024 2028 +0.2% 1.00x
RemoveWhereFilterString 1463 1448 -1.0% 1.01x
RemoveWhereFilterStrings 2849 2849 +0.0% 1.00x
RemoveWhereMoveInts 3328 3334 +0.2% 1.00x (?)
RemoveWhereMoveStrings 4031 4036 +0.1% 1.00x
RemoveWhereQuadraticInts 7630 7639 +0.1% 1.00x (?)
RemoveWhereQuadraticString 2293 2288 -0.2% 1.00x (?)
RemoveWhereQuadraticStrings 9293 9301 +0.1% 1.00x (?)
RemoveWhereSwapInts 5993 5985 -0.1% 1.00x
RemoveWhereSwapStrings 6712 6676 -0.5% 1.01x
ReversedArray 13799 13809 +0.1% 1.00x (?)
ReversedBidirectional 42363 42522 +0.4% 1.00x (?)
ReversedDictionary 22989 22833 -0.7% 1.01x (?)
RomanNumbers 1148162 1168455 +1.8% 0.98x (?)
SequenceAlgosAnySequence 10882 10854 -0.3% 1.00x (?)
SequenceAlgosArray 771086 771804 +0.1% 1.00x (?)
SequenceAlgosContiguousArray 321509 322728 +0.4% 1.00x (?)
SequenceAlgosList 8116 8150 +0.4% 1.00x (?)
SequenceAlgosRange 1062148 1059078 -0.3% 1.00x
SequenceAlgosUnfoldSequence 5546 5614 +1.2% 0.99x
SetExclusiveOr 17393 17442 +0.3% 1.00x (?)
SetExclusiveOr_OfObjects 42013 42154 +0.3% 1.00x (?)
SetIntersect 8166 8285 +1.5% 0.99x (?)
SetIntersect_OfObjects 12269 12276 +0.1% 1.00x (?)
SetIsSubsetOf 1346 1353 +0.5% 0.99x
SetIsSubsetOf_OfObjects 1571 1571 +0.0% 1.00x
SetUnion 11852 11942 +0.8% 0.99x
SetUnion_OfObjects 29389 29514 +0.4% 1.00x (?)
SevenBoom 1670 1672 +0.1% 1.00x (?)
Sim2DArray 43821 45708 +4.3% 0.96x (?)
SortLargeExistentials 15712 15698 -0.1% 1.00x (?)
SortLettersInPlace 2682 2664 -0.7% 1.01x (?)
SortSortedStrings 1050 1085 +3.3% 0.97x
SortStrings 2061 2091 +1.5% 0.99x
SortStringsUnicode 2784 2879 +3.4% 0.97x
StackPromo 100232 97253 -3.0% 1.03x
StaticArray 2656 2662 +0.2% 1.00x (?)
StrComplexWalk 6669 6447 -3.3% 1.03x
StrToInt 58014 57497 -0.9% 1.01x
StringAdder 4685 4702 +0.4% 1.00x (?)
StringBuilder 6773 6743 -0.4% 1.00x (?)
StringBuilderLong 2730 2732 +0.1% 1.00x
StringComparison_abnormal 1322 1319 -0.2% 1.00x (?)
StringComparison_ascii 9569 9614 +0.5% 1.00x
StringComparison_emoji 2077 2106 +1.4% 0.99x
StringComparison_fastPrenormal 5205 5234 +0.6% 0.99x
StringComparison_latin1 4041 4069 +0.7% 0.99x
StringComparison_longSharedPrefix 2474 2481 +0.3% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 3824 3868 +1.2% 0.99x (?)
StringComparison_slowerPrenormal 4305 4345 +0.9% 0.99x
StringComparison_zalgo 116236 116706 +0.4% 1.00x (?)
StringEnumRawValueInitialization 17461 17510 +0.3% 1.00x (?)
StringEqualPointerComparison 3707 3666 -1.1% 1.01x
StringFromLongWholeSubstring 29 29 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 199 200 +0.5% 1.00x
StringHasPrefixAscii 3017 3002 -0.5% 1.00x
StringHasPrefixUnicode 29367 29438 +0.2% 1.00x (?)
StringHasSuffixAscii 3172 3200 +0.9% 0.99x
StringHasSuffixUnicode 86611 86723 +0.1% 1.00x (?)
StringInterpolation 13096 13173 +0.6% 0.99x
StringMatch 34125 33622 -1.5% 1.01x
StringRemoveDupes 1383 1382 -0.1% 1.00x (?)
StringUTF16Builder 7635 7672 +0.5% 1.00x
StringWalk 13237 12783 -3.4% 1.04x
StringWithCString 37612 37708 +0.3% 1.00x (?)
StringWordBuilder 2678 2679 +0.0% 1.00x (?)
StringWordBuilderReservingCapacity 2294 2296 +0.1% 1.00x (?)
SubstringComparable 2038 2040 +0.1% 1.00x (?)
SubstringEqualString 1894 1892 -0.1% 1.00x (?)
SubstringFromLongString 30 30 +0.0% 1.00x
SubstringFromLongStringGeneric 103 103 +0.0% 1.00x
SuffixAnyCollection 4629 4613 -0.3% 1.00x (?)
SuffixAnyCollectionLazy 32409 31646 -2.4% 1.02x (?)
SuffixAnySeqCRangeIter 33406 33269 -0.4% 1.00x (?)
SuffixAnySeqCRangeIterLazy 33419 33270 -0.4% 1.00x
SuffixAnySeqCntRange 4632 4621 -0.2% 1.00x
SuffixAnySeqCntRangeLazy 4624 4577 -1.0% 1.01x
SuffixAnySequence 24958 24906 -0.2% 1.00x (?)
SuffixAnySequenceLazy 24805 24840 +0.1% 1.00x (?)
SuffixCountableRange 112 111 -0.9% 1.01x
SuffixCountableRangeLazy 8606 8592 -0.2% 1.00x (?)
SuffixSequence 24944 25046 +0.4% 1.00x
SuffixSequenceLazy 24764 24845 +0.3% 1.00x (?)
SumUsingReduce 165062 163964 -0.7% 1.01x
SumUsingReduceInto 157505 157344 -0.1% 1.00x (?)
SuperChars 123199 124470 +1.0% 0.99x (?)
TwoSum 3914 3920 +0.2% 1.00x (?)
TypeFlood 166 174 +4.8% 0.95x (?)
UTF8Decode 30074 29890 -0.6% 1.01x (?)
Walsh 12170 12167 -0.0% 1.00x (?)
WordCountHistogramASCII 47559 47586 +0.1% 1.00x (?)
WordCountHistogramUTF16 71169 69449 -2.4% 1.02x
WordCountUniqueASCII 8262 8135 -1.5% 1.02x (?)
WordSplitASCII 26454 26627 +0.7% 0.99x (?)
WordSplitUTF16 29298 27982 -4.5% 1.05x (?)
XorLoop 23371 23373 +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

@lancep lancep changed the title Fix a data race with _swiftEmptyArrayStorage's count [stdlib] Fix a data race with _swiftEmptyArrayStorage's count Feb 22, 2018
newResult.firstElementAddress.moveInitialize(
from: result.firstElementAddress, count: result.capacity)
result.count = 0
if !result.isEmpty {
Copy link
Contributor

Choose a reason for hiding this comment

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

The change looks fine, I'm just probably overthinking the weird ways this condition gets to basically saying result.count != 0, and it's effects on performance and clarity of what's going on =)

@lancep lancep merged commit 86d5ba2 into swiftlang:master Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants