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

[stdlib] Use addressor for Dictionary's subscript(_:default:) #12752

Merged
merged 6 commits into from Dec 4, 2017

Conversation

Projects
None yet
8 participants
@hamishknight
Copy link
Contributor

hamishknight commented Nov 3, 2017

Given we now have the law of exclusivity, I believe we can use an addressor for Dictionary's subscript(_:default:) by first inserting the default value if not already present for the given key, and handing back a pointer to the value in the buffer.

This allows us to prevent the copying of a dictionary's value on mutation through this subscript. For example, we can now mutate an array value in-place:

var dict: [String: [String]] = ["foo": []]
dict["foo", default: []].append("bar") // in-place appending
dict["foo", default: []].append("baz") // in-place appending

The only cons that I can see to this change is that:

  1. Using the subscript for plain assignment (dict["foo", default: []] = ...) is now less efficient, as it'll attempt to insert the default value before immediately overwriting it with the new value (and needlessly evaluate the autoclosure'd default value if inserted). However, frankly using assignment with this subscript is pointless, as the default value has no effect.

  2. Code that runs without exclusivity checks will be able to see the default value already inserted while in the window of mutation. However I don't believe we guarantee any specified behaviour for breaking the law of exclusivity (is that right?).

I appreciate any and all feedback on this change; specifically whether or not I've missed any reason why we cannot/shouldn't do this.

@@ -25,6 +25,31 @@ func equalsUnordered<T : Comparable>(_ lhs: [T], _ rhs: [T]) -> Bool {
return lhs.sorted().elementsEqual(rhs.sorted())
}

// A COW wrapper type that holds an Int.

This comment has been minimized.

@hamishknight

hamishknight Nov 3, 2017

Author Contributor

Is this the right place to define this, and is there an already existing mock COW wrapper I could use here?

This comment has been minimized.

@lorentey

lorentey Dec 3, 2017

Member

It's perfectly fine to add this here!

@slavapestov

This comment has been minimized.

Copy link
Member

slavapestov commented Nov 3, 2017

@swift-ci Please smoke test

@slavapestov

This comment has been minimized.

Copy link
Member

slavapestov commented Nov 3, 2017

@swift-ci Please benchmark

@natecook1000

This comment has been minimized.

Copy link
Member

natecook1000 commented Nov 3, 2017

@hamishknight This is super interesting! It looks like this might also solve an issue where using a class instance as the default doesn't actually assign:

var d: [String: UIView] = [:]
d["foo", default: UIView()].addSubview(UIView())
print(d["foo"] as Any)

Also, re this bit, the CI has been updated so it can handle new benchmarks in this same PR:

I need to open a PR that adds subscript(_:default:) benchmark(s) so we can see an improvement on this PR being merged.

@hamishknight

This comment has been minimized.

Copy link
Contributor Author

hamishknight commented Nov 3, 2017

@natecook1000 Thanks! I don't believe it'll solve the problem you mention, as the compiler will still just call the getter directly (as it's dealing with a reference type), therefore not inserting the default value.

I believe that'd have to be a compiler-level change to make that work (well not unless the getter is changed to always attempt to insert the default value; but that goes contrary to the semantics you set out in the evolution proposal that introduced the subscript).

Also, re this bit, the CI has been updated so it can handle new benchmarks in this same PR:

I need to open a PR that adds subscript(_:default:) benchmark(s) so we can see an improvement on this PR being merged.

Awesome – I'll get on with that then :)

@hamishknight hamishknight changed the title [stdlib][WIP] Use addressor for Dictionary's subscript(_:default:) [stdlib] Use addressor for Dictionary's subscript(_:default:) Nov 4, 2017

@hamishknight

This comment has been minimized.

Copy link
Contributor Author

hamishknight commented Nov 4, 2017

@natecook1000 I've gone ahead and added the benchmarks, could you please kick off the CI bot? (I'm not sure whether or not I'm able to). I think this PR is ready for review now :)

@natecook1000

This comment has been minimized.

Copy link
Member

natecook1000 commented Nov 4, 2017

@swift-ci Please smoke test

@natecook1000

This comment has been minimized.

Copy link
Member

natecook1000 commented Nov 4, 2017

@swift-ci Please benchmark

1 similar comment
@natecook1000

This comment has been minimized.

Copy link
Member

natecook1000 commented Nov 4, 2017

@swift-ci Please benchmark

@natecook1000 natecook1000 requested a review from moiseev Nov 4, 2017

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Nov 4, 2017

Build comment file:

Optimized (O)

Regression (4)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectToString 36722 39489 +7.5% 0.93x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4071 4369 +7.3% 0.93x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 107266 113404 +5.7% 0.95x (?)
ObjectiveCBridgeToNSString 1062 1121 +5.6% 0.95x
Improvement (15)
TEST OLD NEW DELTA SPEEDUP
Sim2DArray 604 368 -39.1% 1.64x
FrequenciesUsingReduceInto 3624 2503 -30.9% 1.45x
FrequenciesUsingReduce 6539 5427 -17.0% 1.20x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6835 5781 -15.4% 1.18x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 74499 63995 -14.1% 1.16x
ErrorHandling 2048 1803 -12.0% 1.14x (?)
StringEqualPointerComparison 411 372 -9.5% 1.10x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 78320 72313 -7.7% 1.08x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 129825 119995 -7.6% 1.08x
ObjectiveCBridgeStubFromArrayOfNSString 27476 25480 -7.3% 1.08x (?)
StringEdits 168067 156039 -7.2% 1.08x
DropFirstAnyCollectionLazy 70701 66455 -6.0% 1.06x
LazilyFilteredArrayContains 19037 17965 -5.6% 1.06x
ArraySetElement 463 437 -5.6% 1.06x
ExclusivityInMatSet 18 17 -5.6% 1.06x
No Changes (315)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 2509 2518 +0.4% 1.00x
AnyHashableWithAClass 63078 61927 -1.8% 1.02x
Array2D 2253 2255 +0.1% 1.00x (?)
ArrayAppend 902 904 +0.2% 1.00x (?)
ArrayAppendArrayOfInt 628 628 +0.0% 1.00x
ArrayAppendAscii 20896 20934 +0.2% 1.00x (?)
ArrayAppendFromGeneric 629 628 -0.2% 1.00x (?)
ArrayAppendGenericStructs 1153 1154 +0.1% 1.00x (?)
ArrayAppendLatin1 38761 38781 +0.1% 1.00x (?)
ArrayAppendLazyMap 1133 1133 +0.0% 1.00x
ArrayAppendOptionals 1153 1154 +0.1% 1.00x
ArrayAppendRepeatCol 1130 1130 +0.0% 1.00x
ArrayAppendReserved 682 684 +0.3% 1.00x (?)
ArrayAppendSequence 1071 1071 +0.0% 1.00x
ArrayAppendStrings 14631 14656 +0.2% 1.00x
ArrayAppendToFromGeneric 628 631 +0.5% 1.00x
ArrayAppendToGeneric 629 629 +0.0% 1.00x
ArrayAppendUTF16 39916 39979 +0.2% 1.00x (?)
ArrayInClass 77 77 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD 191 191 +0.0% 1.00x
ArrayOfGenericRef 3425 3428 +0.1% 1.00x (?)
ArrayOfPOD 151 151 +0.0% 1.00x
ArrayOfRef 3462 3462 +0.0% 1.00x
ArrayPlusEqualArrayOfInt 628 628 +0.0% 1.00x
ArrayPlusEqualFiveElementCollection 3969 3967 -0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 900 901 +0.1% 1.00x (?)
ArrayPlusEqualThreeElements 1403 1420 +1.2% 0.99x (?)
ArraySubscript 1322 1318 -0.3% 1.00x (?)
ArrayValueProp 7 7 +0.0% 1.00x
ArrayValueProp2 7 7 +0.0% 1.00x
ArrayValueProp3 7 7 +0.0% 1.00x
ArrayValueProp4 7 7 +0.0% 1.00x
BitCount 181 181 +0.0% 1.00x
ByteSwap 91 91 +0.0% 1.00x
CStringLongAscii 5312 5309 -0.1% 1.00x (?)
CStringLongNonAscii 2222 2222 +0.0% 1.00x
CStringShortAscii 4271 4279 +0.2% 1.00x
Calculator 37 37 +0.0% 1.00x
CaptureProp 5391 5142 -4.6% 1.05x
CharIndexing_ascii_unicodeScalars 13383 13394 +0.1% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 10549 10214 -3.2% 1.03x
CharIndexing_chinese_unicodeScalars 10141 10140 -0.0% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 7996 7751 -3.1% 1.03x
CharIndexing_japanese_unicodeScalars 16036 16035 -0.0% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 12618 12219 -3.2% 1.03x
CharIndexing_korean_unicodeScalars 12980 12984 +0.0% 1.00x (?)
CharIndexing_korean_unicodeScalars_Backwards 10222 9911 -3.0% 1.03x
CharIndexing_punctuatedJapanese_unicodeScalars 2424 2423 -0.0% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 1938 1884 -2.8% 1.03x
CharIndexing_punctuated_unicodeScalars 3040 3039 -0.0% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 2411 2348 -2.6% 1.03x
CharIndexing_russian_unicodeScalars 11158 11156 -0.0% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 8791 8517 -3.1% 1.03x
CharIndexing_tweet_unicodeScalars 26424 26409 -0.1% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 20781 20149 -3.0% 1.03x
CharIndexing_utf16_unicodeScalars 74058 75461 +1.9% 0.98x
CharIndexing_utf16_unicodeScalars_Backwards 54418 54434 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars 14895 14900 +0.0% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 15229 15248 +0.1% 1.00x
CharIteration_chinese_unicodeScalars 11277 11276 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 11544 11538 -0.1% 1.00x
CharIteration_japanese_unicodeScalars 17838 17845 +0.0% 1.00x
CharIteration_japanese_unicodeScalars_Backwards 18238 18240 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars 14444 14448 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 14772 14765 -0.0% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars 2680 2680 +0.0% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2736 2736 +0.0% 1.00x
CharIteration_punctuated_unicodeScalars 3363 3354 -0.3% 1.00x
CharIteration_punctuated_unicodeScalars_Backwards 3429 3432 +0.1% 1.00x
CharIteration_russian_unicodeScalars 12412 12408 -0.0% 1.00x (?)
CharIteration_russian_unicodeScalars_Backwards 12683 12687 +0.0% 1.00x (?)
CharIteration_tweet_unicodeScalars 29391 29412 +0.1% 1.00x (?)
CharIteration_tweet_unicodeScalars_Backwards 30134 30094 -0.1% 1.00x (?)
CharIteration_utf16_unicodeScalars 70101 72116 +2.9% 0.97x
CharIteration_utf16_unicodeScalars_Backwards 88316 88602 +0.3% 1.00x
CharacterLiteralsLarge 5101 5107 +0.1% 1.00x
CharacterLiteralsSmall 339 340 +0.3% 1.00x
Chars 617 617 +0.0% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
DeadArray 179 179 +0.0% 1.00x
Dictionary 508 507 -0.2% 1.00x (?)
Dictionary2 1612 1613 +0.1% 1.00x (?)
Dictionary2OfObjects 2865 2811 -1.9% 1.02x
Dictionary3 412 408 -1.0% 1.01x
Dictionary3OfObjects 720 719 -0.1% 1.00x (?)
DictionaryBridge 3278 3327 +1.5% 0.99x (?)
DictionaryGroup 232 232 +0.0% 1.00x
DictionaryGroupOfObjects 1569 1535 -2.2% 1.02x
DictionaryLiteral 1269 1271 +0.2% 1.00x (?)
DictionaryOfObjects 1935 1930 -0.3% 1.00x (?)
DictionaryRemove 2226 2222 -0.2% 1.00x (?)
DictionaryRemoveOfObjects 19770 19815 +0.2% 1.00x
DictionarySwap 395 397 +0.5% 0.99x
DictionarySwapOfObjects 6380 6322 -0.9% 1.01x (?)
DropFirstAnyCollection 68 68 +0.0% 1.00x
DropFirstAnySeqCRangeIter 24706 25208 +2.0% 0.98x
DropFirstAnySeqCRangeIterLazy 24693 25270 +2.3% 0.98x (?)
DropFirstAnySeqCntRange 64 64 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 64 64 +0.0% 1.00x
DropFirstAnySequence 5354 5356 +0.0% 1.00x (?)
DropFirstAnySequenceLazy 5356 5376 +0.4% 1.00x
DropFirstArray 31 31 +0.0% 1.00x
DropFirstArrayLazy 31 31 +0.0% 1.00x
DropFirstCountableRange 31 31 +0.0% 1.00x
DropFirstCountableRangeLazy 31 31 +0.0% 1.00x
DropFirstSequence 1725 1732 +0.4% 1.00x
DropFirstSequenceLazy 1752 1754 +0.1% 1.00x
DropLastAnyCollection 25 25 +0.0% 1.00x
DropLastAnyCollectionLazy 22434 22265 -0.8% 1.01x (?)
DropLastAnySeqCRangeIter 4327 4131 -4.5% 1.05x
DropLastAnySeqCRangeIterLazy 4281 4144 -3.2% 1.03x
DropLastAnySeqCntRange 21 21 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 21 21 +0.0% 1.00x
DropLastAnySequence 5884 5948 +1.1% 0.99x
DropLastAnySequenceLazy 5988 6008 +0.3% 1.00x
DropLastArray 10 10 +0.0% 1.00x
DropLastArrayLazy 10 10 +0.0% 1.00x
DropLastCountableRange 10 10 +0.0% 1.00x
DropLastCountableRangeLazy 10 10 +0.0% 1.00x
DropLastSequence 613 607 -1.0% 1.01x
DropLastSequenceLazy 613 608 -0.8% 1.01x
DropWhileAnyCollection 89 89 +0.0% 1.00x
DropWhileAnyCollectionLazy 132 132 +0.0% 1.00x
DropWhileAnySeqCRangeIter 19347 19309 -0.2% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 132 132 +0.0% 1.00x
DropWhileAnySeqCntRange 85 85 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 132 132 +0.0% 1.00x
DropWhileAnySequence 5390 5337 -1.0% 1.01x
DropWhileAnySequenceLazy 1786 1785 -0.1% 1.00x (?)
DropWhileArray 63 63 +0.0% 1.00x
DropWhileArrayLazy 116 116 +0.0% 1.00x
DropWhileCountableRange 32 32 +0.0% 1.00x
DropWhileCountableRangeLazy 100 100 +0.0% 1.00x
DropWhileSequence 1298 1297 -0.1% 1.00x
DropWhileSequenceLazy 79 79 +0.0% 1.00x
EqualStringSubstring 358 361 +0.8% 0.99x
EqualSubstringString 358 360 +0.6% 0.99x
EqualSubstringSubstring 360 361 +0.3% 1.00x
EqualSubstringSubstringGenericEquatable 361 363 +0.6% 0.99x
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1155 1143 -1.0% 1.01x
FilterEvenUsingReduceInto 129 129 +0.0% 1.00x
Hanoi 3429 3389 -1.2% 1.01x
HashTest 1540 1536 -0.3% 1.00x (?)
Histogram 259 259 +0.0% 1.00x
Integrate 229 229 +0.0% 1.00x
IterateData 1237 1266 +2.3% 0.98x
Join 336 338 +0.6% 0.99x (?)
LazilyFilteredArrays 48724 48861 +0.3% 1.00x (?)
LazilyFilteredRange 3569 3560 -0.3% 1.00x (?)
LessSubstringSubstring 360 360 +0.0% 1.00x
LessSubstringSubstringGenericComparable 360 363 +0.8% 0.99x
LinkedList 6434 6383 -0.8% 1.01x
MapReduce 382 383 +0.3% 1.00x
MapReduceAnyCollection 384 383 -0.3% 1.00x
MapReduceAnyCollectionShort 1831 1840 +0.5% 1.00x
MapReduceClass 2654 2655 +0.0% 1.00x (?)
MapReduceClassShort 4017 4000 -0.4% 1.00x (?)
MapReduceLazyCollection 12 12 +0.0% 1.00x
MapReduceLazyCollectionShort 7 7 +0.0% 1.00x
MapReduceLazySequence 77 77 +0.0% 1.00x
MapReduceSequence 397 394 -0.8% 1.01x
MapReduceShort 1740 1733 -0.4% 1.00x (?)
MapReduceShortString 20 20 +0.0% 1.00x
MapReduceString 99 103 +4.0% 0.96x
Memset 192 193 +0.5% 0.99x (?)
MonteCarloE 9311 9300 -0.1% 1.00x (?)
MonteCarloPi 38524 38431 -0.2% 1.00x
NSDictionaryCastToSwift 4649 4726 +1.7% 0.98x (?)
NSError 281 280 -0.4% 1.00x (?)
NSStringConversion 365 362 -0.8% 1.01x
NopDeinit 19366 19366 +0.0% 1.00x
ObjectAllocation 156 155 -0.6% 1.01x
ObjectiveCBridgeFromNSArrayAnyObject 20654 20572 -0.4% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3732 3616 -3.1% 1.03x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 34309 34668 +1.0% 0.99x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 127425 128440 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObject 64757 64182 -0.9% 1.01x (?)
ObjectiveCBridgeFromNSString 916 891 -2.7% 1.03x
ObjectiveCBridgeFromNSStringForced 1919 1857 -3.2% 1.03x (?)
ObjectiveCBridgeStubDataAppend 3453 3477 +0.7% 0.99x
ObjectiveCBridgeStubDateAccess 205 205 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 230 231 +0.4% 1.00x
ObjectiveCBridgeStubFromNSDate 3740 3712 -0.7% 1.01x
ObjectiveCBridgeStubFromNSDateRef 4042 4067 +0.6% 0.99x (?)
ObjectiveCBridgeStubFromNSString 571 559 -2.1% 1.02x
ObjectiveCBridgeStubFromNSStringRef 155 159 +2.6% 0.97x (?)
ObjectiveCBridgeStubNSDataAppend 2381 2410 +1.2% 0.99x
ObjectiveCBridgeStubNSDateMutationRef 11890 11865 -0.2% 1.00x (?)
ObjectiveCBridgeStubNSDateRefAccess 336 346 +3.0% 0.97x
ObjectiveCBridgeStubToArrayOfNSString 27124 27473 +1.3% 0.99x
ObjectiveCBridgeStubToNSDate 13512 13684 +1.3% 0.99x (?)
ObjectiveCBridgeStubToNSDateRef 3042 3021 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSString 1282 1273 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSStringRef 114 118 +3.5% 0.97x
ObjectiveCBridgeStubURLAppendPath 296397 304985 +2.9% 0.97x (?)
ObjectiveCBridgeStubURLAppendPathRef 296336 292564 -1.3% 1.01x (?)
ObjectiveCBridgeToNSArray 26897 26494 -1.5% 1.02x (?)
ObjectiveCBridgeToNSDictionary 53392 52661 -1.4% 1.01x (?)
ObjectiveCBridgeToNSSet 44469 43903 -1.3% 1.01x (?)
ObserverClosure 2004 1985 -0.9% 1.01x (?)
ObserverForwarderStruct 917 918 +0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 3355 3350 -0.1% 1.00x (?)
ObserverUnappliedMethod 2091 2080 -0.5% 1.01x
OpenClose 5 5 +0.0% 1.00x
Phonebook 5844 5796 -0.8% 1.01x
PolymorphicCalls 22 22 +0.0% 1.00x
PopFrontArray 1779 1807 +1.6% 0.98x (?)
PopFrontArrayGeneric 1784 1783 -0.1% 1.00x (?)
PopFrontUnsafePointer 8545 8554 +0.1% 1.00x (?)
PrefixAnyCollection 68 68 +0.0% 1.00x
PrefixAnyCollectionLazy 66739 67068 +0.5% 1.00x (?)
PrefixAnySeqCRangeIter 19380 19423 +0.2% 1.00x
PrefixAnySeqCRangeIterLazy 19368 19472 +0.5% 0.99x
PrefixAnySeqCntRange 64 64 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 64 64 +0.0% 1.00x
PrefixAnySequence 4651 4601 -1.1% 1.01x
PrefixAnySequenceLazy 4675 4605 -1.5% 1.02x
PrefixArray 31 31 +0.0% 1.00x
PrefixArrayLazy 31 31 +0.0% 1.00x
PrefixCountableRange 31 31 +0.0% 1.00x
PrefixCountableRangeLazy 31 31 +0.0% 1.00x
PrefixSequence 1314 1314 +0.0% 1.00x
PrefixSequenceLazy 1331 1331 +0.0% 1.00x
PrefixWhileAnyCollection 131 131 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 95 95 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 11321 11506 +1.6% 0.98x
PrefixWhileAnySeqCRangeIterLazy 95 95 +0.0% 1.00x
PrefixWhileAnySeqCntRange 127 127 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 95 95 +0.0% 1.00x
PrefixWhileAnySequence 12631 12659 +0.2% 1.00x (?)
PrefixWhileAnySequenceLazy 1312 1312 +0.0% 1.00x
PrefixWhileArray 94 94 +0.0% 1.00x
PrefixWhileArrayLazy 63 63 +0.0% 1.00x
PrefixWhileCountableRange 48 48 +0.0% 1.00x
PrefixWhileCountableRangeLazy 31 31 +0.0% 1.00x
PrefixWhileSequence 348 349 +0.3% 1.00x (?)
PrefixWhileSequenceLazy 47 47 +0.0% 1.00x
Prims 663 657 -0.9% 1.01x
PrimsSplit 662 662 +0.0% 1.00x
ProtocolDispatch 2827 2827 +0.0% 1.00x
ProtocolDispatch2 127 127 +0.0% 1.00x
RC4 154 148 -3.9% 1.04x
RGBHistogram 2002 1965 -1.8% 1.02x
RGBHistogramOfObjects 20119 20095 -0.1% 1.00x (?)
RangeAssignment 337 339 +0.6% 0.99x
RangeIterationSigned 179 179 +0.0% 1.00x
RangeIterationSigned64 179 179 +0.0% 1.00x
RangeIterationUnsigned 180 179 -0.6% 1.01x
RecursiveOwnedParameter 2035 2038 +0.1% 1.00x (?)
ReversedArray 51 51 +0.0% 1.00x
ReversedBidirectional 24898 24886 -0.0% 1.00x (?)
ReversedDictionary 73 73 +0.0% 1.00x
SetExclusiveOr 2592 2592 +0.0% 1.00x
SetExclusiveOr_OfObjects 7199 7196 -0.0% 1.00x (?)
SetIntersect 240 248 +3.3% 0.97x
SetIntersect_OfObjects 1527 1521 -0.4% 1.00x
SetIsSubsetOf 253 253 +0.0% 1.00x
SetIsSubsetOf_OfObjects 311 311 +0.0% 1.00x
SetUnion 2317 2352 +1.5% 0.99x
SetUnion_OfObjects 5987 6006 +0.3% 1.00x (?)
SevenBoom 1411 1412 +0.1% 1.00x (?)
SortLargeExistentials 7838 7652 -2.4% 1.02x
SortLettersInPlace 972 977 +0.5% 0.99x
SortSortedStrings 894 891 -0.3% 1.00x
SortStrings 1616 1619 +0.2% 1.00x
SortStringsUnicode 7979 7981 +0.0% 1.00x (?)
StackPromo 20099 20054 -0.2% 1.00x (?)
StaticArray 5 5 +0.0% 1.00x
StrComplexWalk 1782 1781 -0.1% 1.00x
StrToInt 1899 1918 +1.0% 0.99x
StringAdder 3014 3038 +0.8% 0.99x (?)
StringBuilder 886 881 -0.6% 1.01x (?)
StringBuilderLong 880 852 -3.2% 1.03x (?)
StringEnumRawValueInitialization 698 699 +0.1% 1.00x
StringFromLongWholeSubstring 159 153 -3.8% 1.04x
StringFromLongWholeSubstringGeneric 73 74 +1.4% 0.99x (?)
StringHasPrefix 15 15 +0.0% 1.00x
StringHasPrefixUnicode 15672 15938 +1.7% 0.98x
StringHasSuffix 15 15 +0.0% 1.00x
StringHasSuffixUnicode 68544 69772 +1.8% 0.98x (?)
StringInterpolation 9877 9741 -1.4% 1.01x (?)
StringMatch 7822 7986 +2.1% 0.98x
StringUTF16Builder 1642 1648 +0.4% 1.00x (?)
StringWalk 1436 1441 +0.3% 1.00x
StringWithCString 63779 64085 +0.5% 1.00x
SubstringComparable 1534 1504 -2.0% 1.02x
SubstringEqualString 1336 1319 -1.3% 1.01x
SubstringEquatable 3420 3356 -1.9% 1.02x
SubstringFromLongString 9 9 +0.0% 1.00x
SubstringFromLongStringGeneric 64 63 -1.6% 1.02x
SuffixAnyCollection 25 25 +0.0% 1.00x
SuffixAnyCollectionLazy 22897 22670 -1.0% 1.01x (?)
SuffixAnySeqCRangeIter 4388 4389 +0.0% 1.00x (?)
SuffixAnySeqCRangeIterLazy 4413 4418 +0.1% 1.00x (?)
SuffixAnySeqCntRange 21 21 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 21 21 +0.0% 1.00x
SuffixAnySequence 5987 5949 -0.6% 1.01x
SuffixAnySequenceLazy 6108 6023 -1.4% 1.01x
SuffixArray 10 10 +0.0% 1.00x
SuffixArrayLazy 10 10 +0.0% 1.00x
SuffixCountableRange 10 10 +0.0% 1.00x
SuffixCountableRangeLazy 10 10 +0.0% 1.00x
SuffixSequence 4210 4185 -0.6% 1.01x
SuffixSequenceLazy 4207 4167 -1.0% 1.01x (?)
SumUsingReduce 91 91 +0.0% 1.00x
SumUsingReduceInto 87 87 +0.0% 1.00x
SuperChars 74418 74214 -0.3% 1.00x (?)
TwoSum 834 835 +0.1% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 292 281 -3.8% 1.04x
Walsh 391 384 -1.8% 1.02x
XorLoop 327 327 +0.0% 1.00x
Added (4)
TEST MIN MAX MEAN MAX_RSS
DictionarySubscriptDefaultMutation 126 126 126 11274923
DictionarySubscriptDefaultMutationArray 423 427 425 11333632
DictionarySubscriptDefaultMutationArrayOfObjects 3054 3106 3084 11784192
DictionarySubscriptDefaultMutationOfObjects 1142 1145 1144 11268096

Unoptimized (Onone)

Regression (9)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeStubFromArrayOfNSString 25533 28271 +10.7% 0.90x (?)
SuffixAnySeqCntRangeLazy 6019 6600 +9.7% 0.91x
DropWhileAnySeqCntRange 23627 25380 +7.4% 0.93x
PrefixAnySeqCntRangeLazy 18025 19345 +7.3% 0.93x
ArrayOfGenericPOD 1476 1578 +6.9% 0.94x
PrefixWhileAnySeqCRangeIterLazy 20858 22277 +6.8% 0.94x (?)
FilterEvenUsingReduce 3767 4010 +6.5% 0.94x (?)
SuffixAnyCollection 6172 6567 +6.4% 0.94x
SevenBoom 1447 1535 +6.1% 0.94x (?)
Improvement (47)
TEST OLD NEW DELTA SPEEDUP
FrequenciesUsingReduceInto 10013 5120 -48.9% 1.96x
SuffixArray 3472 1780 -48.7% 1.95x
PrefixArray 10331 5323 -48.5% 1.94x
DropLastArray 3411 1780 -47.8% 1.92x
DropFirstArray 10142 5325 -47.5% 1.90x
StringMatch 51806 31533 -39.1% 1.64x
DropWhileArray 13573 8506 -37.3% 1.60x
FrequenciesUsingReduce 16202 11870 -26.7% 1.36x
PrefixWhileArray 19837 14807 -25.4% 1.34x
ErrorHandling 7595 5982 -21.2% 1.27x
SubstringComparable 4509 3742 -17.0% 1.20x
Join 1617 1352 -16.4% 1.20x
StringUTF16Builder 8332 6980 -16.2% 1.19x
SuperChars 214655 181437 -15.5% 1.18x
StringBuilder 7385 6243 -15.5% 1.18x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 40399 34400 -14.8% 1.17x
SuffixAnyCollectionLazy 52116 44621 -14.4% 1.17x
StringEdits 469306 403138 -14.1% 1.16x
DropLastAnyCollectionLazy 52061 44929 -13.7% 1.16x
EqualSubstringString 700 606 -13.4% 1.16x
DropFirstAnyCollectionLazy 158130 137028 -13.3% 1.15x
SubstringEquatable 9031 7851 -13.1% 1.15x
EqualStringSubstring 695 606 -12.8% 1.15x
StringBuilderLong 1471 1283 -12.8% 1.15x
Dictionary 3177 2785 -12.3% 1.14x
LessSubstringSubstring 800 702 -12.2% 1.14x
ObjectiveCBridgeStubNSDateMutationRef 15786 13860 -12.2% 1.14x
AngryPhonebook 4836 4294 -11.2% 1.13x (?)
EqualSubstringSubstring 773 698 -9.7% 1.11x
ObjectiveCBridgeFromNSArrayAnyObjectForced 7688 6947 -9.6% 1.11x (?)
PrefixAnyCollectionLazy 152797 138935 -9.1% 1.10x
PrefixWhileCountableRangeLazy 21230 19614 -7.6% 1.08x (?)
CharIteration_utf16_unicodeScalars 192932 178526 -7.5% 1.08x
LazilyFilteredArrays 1661926 1538198 -7.4% 1.08x (?)
FilterEvenUsingReduceInto 2376 2202 -7.3% 1.08x
CharIndexing_utf16_unicodeScalars 537656 498910 -7.2% 1.08x
PrefixWhileAnySeqCRangeIter 40185 37466 -6.8% 1.07x
NSDictionaryCastToSwift 6036 5659 -6.2% 1.07x (?)
MapReduceShortString 287 270 -5.9% 1.06x (?)
ArrayPlusEqualSingleElementCollection 273769 257754 -5.8% 1.06x
ObjectiveCBridgeFromNSSetAnyObjectToString 84201 79294 -5.8% 1.06x (?)
CStringShortAscii 8221 7743 -5.8% 1.06x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 83130 78398 -5.7% 1.06x (?)
CharIndexing_utf16_unicodeScalars_Backwards 553416 522494 -5.6% 1.06x
SubstringEqualString 7305 6921 -5.3% 1.06x (?)
BitCount 1937 1836 -5.2% 1.06x
ArrayPlusEqualThreeElements 10076 9595 -4.8% 1.05x
No Changes (278)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 76651 76800 +0.2% 1.00x
Array2D 568960 571081 +0.4% 1.00x
ArrayAppend 4967 4866 -2.0% 1.02x
ArrayAppendArrayOfInt 688 682 -0.9% 1.01x
ArrayAppendAscii 47551 47481 -0.1% 1.00x (?)
ArrayAppendFromGeneric 690 685 -0.7% 1.01x
ArrayAppendGenericStructs 1216 1211 -0.4% 1.00x
ArrayAppendLatin1 67297 67336 +0.1% 1.00x (?)
ArrayAppendLazyMap 201644 200182 -0.7% 1.01x
ArrayAppendOptionals 1217 1213 -0.3% 1.00x
ArrayAppendRepeatCol 204995 202972 -1.0% 1.01x
ArrayAppendReserved 4644 4647 +0.1% 1.00x
ArrayAppendSequence 66971 65475 -2.2% 1.02x
ArrayAppendStrings 14812 14763 -0.3% 1.00x
ArrayAppendToFromGeneric 689 685 -0.6% 1.01x
ArrayAppendToGeneric 693 686 -1.0% 1.01x
ArrayAppendUTF16 67404 67858 +0.7% 0.99x (?)
ArrayInClass 5833 5857 +0.4% 1.00x
ArrayLiteral 1510 1514 +0.3% 1.00x
ArrayOfGenericRef 8874 8736 -1.6% 1.02x
ArrayOfPOD 762 763 +0.1% 1.00x (?)
ArrayOfRef 8064 8045 -0.2% 1.00x (?)
ArrayPlusEqualArrayOfInt 690 684 -0.9% 1.01x
ArrayPlusEqualFiveElementCollection 272776 263540 -3.4% 1.04x (?)
ArraySetElement 4320 4320 +0.0% 1.00x
ArraySubscript 76377 77091 +0.9% 0.99x
ArrayValueProp 3181 3100 -2.5% 1.03x
ArrayValueProp2 16175 16267 +0.6% 0.99x (?)
ArrayValueProp3 3712 3718 +0.2% 1.00x (?)
ArrayValueProp4 3669 3703 +0.9% 0.99x
ByteSwap 3557 3541 -0.4% 1.00x
CStringLongAscii 5248 5226 -0.4% 1.00x
CStringLongNonAscii 2248 2243 -0.2% 1.00x (?)
Calculator 1092 1091 -0.1% 1.00x (?)
CaptureProp 101972 102190 +0.2% 1.00x
CharIndexing_ascii_unicodeScalars 464850 470055 +1.1% 0.99x (?)
CharIndexing_ascii_unicodeScalars_Backwards 461291 475109 +3.0% 0.97x (?)
CharIndexing_chinese_unicodeScalars 354730 355384 +0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 365384 352675 -3.5% 1.04x (?)
CharIndexing_japanese_unicodeScalars 560571 554575 -1.1% 1.01x (?)
CharIndexing_japanese_unicodeScalars_Backwards 570108 566120 -0.7% 1.01x (?)
CharIndexing_korean_unicodeScalars 452569 466088 +3.0% 0.97x (?)
CharIndexing_korean_unicodeScalars_Backwards 447472 457638 +2.3% 0.98x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 80101 80912 +1.0% 0.99x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 80028 81313 +1.6% 0.98x
CharIndexing_punctuated_unicodeScalars 101299 104350 +3.0% 0.97x
CharIndexing_punctuated_unicodeScalars_Backwards 103716 101820 -1.8% 1.02x (?)
CharIndexing_russian_unicodeScalars 392329 394209 +0.5% 1.00x (?)
CharIndexing_russian_unicodeScalars_Backwards 384389 387869 +0.9% 0.99x (?)
CharIndexing_tweet_unicodeScalars 933011 915736 -1.9% 1.02x
CharIndexing_tweet_unicodeScalars_Backwards 914182 936343 +2.4% 0.98x (?)
CharIteration_ascii_unicodeScalars 162904 161672 -0.8% 1.01x (?)
CharIteration_ascii_unicodeScalars_Backwards 283871 285445 +0.6% 0.99x (?)
CharIteration_chinese_unicodeScalars 122515 122503 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 214873 216027 +0.5% 0.99x (?)
CharIteration_japanese_unicodeScalars 195165 193705 -0.7% 1.01x (?)
CharIteration_japanese_unicodeScalars_Backwards 337653 344774 +2.1% 0.98x
CharIteration_korean_unicodeScalars 157761 156875 -0.6% 1.01x
CharIteration_korean_unicodeScalars_Backwards 272320 276071 +1.4% 0.99x
CharIteration_punctuatedJapanese_unicodeScalars 28775 28666 -0.4% 1.00x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 49605 49814 +0.4% 1.00x (?)
CharIteration_punctuated_unicodeScalars 36105 36066 -0.1% 1.00x (?)
CharIteration_punctuated_unicodeScalars_Backwards 61860 62762 +1.5% 0.99x (?)
CharIteration_russian_unicodeScalars 135486 134665 -0.6% 1.01x (?)
CharIteration_russian_unicodeScalars_Backwards 234086 237056 +1.3% 0.99x (?)
CharIteration_tweet_unicodeScalars 321650 320054 -0.5% 1.00x
CharIteration_tweet_unicodeScalars_Backwards 559262 565704 +1.2% 0.99x (?)
CharIteration_utf16_unicodeScalars_Backwards 358318 347553 -3.0% 1.03x (?)
CharacterLiteralsLarge 5293 5334 +0.8% 0.99x (?)
CharacterLiteralsSmall 701 730 +4.1% 0.96x
Chars 43630 43709 +0.2% 1.00x
ClassArrayGetter 897 894 -0.3% 1.00x
DeadArray 104263 102524 -1.7% 1.02x (?)
Dictionary2 3075 3132 +1.9% 0.98x
Dictionary2OfObjects 5549 5533 -0.3% 1.00x (?)
Dictionary3 1210 1194 -1.3% 1.01x
Dictionary3OfObjects 2116 2083 -1.6% 1.02x (?)
DictionaryBridge 3449 3418 -0.9% 1.01x (?)
DictionaryGroup 4724 4716 -0.2% 1.00x (?)
DictionaryGroupOfObjects 7128 7443 +4.4% 0.96x (?)
DictionaryLiteral 7633 7723 +1.2% 0.99x
DictionaryOfObjects 6672 6521 -2.3% 1.02x (?)
DictionaryRemove 19872 19466 -2.0% 1.02x
DictionaryRemoveOfObjects 53179 52246 -1.8% 1.02x (?)
DictionarySwap 4452 4468 +0.4% 1.00x
DictionarySwapOfObjects 20352 20099 -1.2% 1.01x (?)
DropFirstAnyCollection 18510 17950 -3.0% 1.03x (?)
DropFirstAnySeqCRangeIter 26989 26726 -1.0% 1.01x
DropFirstAnySeqCRangeIterLazy 27069 26857 -0.8% 1.01x
DropFirstAnySeqCntRange 18321 18023 -1.6% 1.02x
DropFirstAnySeqCntRangeLazy 18040 18055 +0.1% 1.00x (?)
DropFirstAnySequence 13659 13385 -2.0% 1.02x
DropFirstAnySequenceLazy 13337 13374 +0.3% 1.00x
DropFirstArrayLazy 39504 39792 +0.7% 0.99x (?)
DropFirstCountableRange 420 419 -0.2% 1.00x (?)
DropFirstCountableRangeLazy 37668 37930 +0.7% 0.99x (?)
DropFirstSequence 12744 12490 -2.0% 1.02x
DropFirstSequenceLazy 12519 12375 -1.2% 1.01x
DropLastAnyCollection 6186 6206 +0.3% 1.00x
DropLastAnySeqCRangeIter 41600 41242 -0.9% 1.01x (?)
DropLastAnySeqCRangeIterLazy 41682 41424 -0.6% 1.01x (?)
DropLastAnySeqCntRange 6091 5991 -1.6% 1.02x (?)
DropLastAnySeqCntRangeLazy 6026 5991 -0.6% 1.01x
DropLastAnySequence 28319 28716 +1.4% 0.99x
DropLastAnySequenceLazy 28352 28790 +1.5% 0.98x
DropLastArrayLazy 13180 13267 +0.7% 0.99x
DropLastCountableRange 144 144 +0.0% 1.00x
DropLastCountableRangeLazy 12553 12681 +1.0% 0.99x (?)
DropLastSequence 28249 28234 -0.1% 1.00x (?)
DropLastSequenceLazy 27971 28301 +1.2% 0.99x
DropWhileAnyCollection 23737 23573 -0.7% 1.01x (?)
DropWhileAnyCollectionLazy 25683 25448 -0.9% 1.01x (?)
DropWhileAnySeqCRangeIter 28187 27835 -1.2% 1.01x (?)
DropWhileAnySeqCRangeIterLazy 25975 25185 -3.0% 1.03x
DropWhileAnySeqCntRangeLazy 25529 25432 -0.4% 1.00x (?)
DropWhileAnySequence 14778 14831 +0.4% 1.00x (?)
DropWhileAnySequenceLazy 12437 12371 -0.5% 1.01x
DropWhileArrayLazy 15403 16077 +4.4% 0.96x
DropWhileCountableRange 5920 5882 -0.6% 1.01x
DropWhileCountableRangeLazy 24542 24138 -1.6% 1.02x
DropWhileSequence 13865 13749 -0.8% 1.01x
DropWhileSequenceLazy 11381 11474 +0.8% 0.99x
EqualSubstringSubstringGenericEquatable 387 389 +0.5% 0.99x
ExclusivityGlobal 169 174 +3.0% 0.97x
ExclusivityInMatSet 291 291 +0.0% 1.00x
ExclusivityIndependent 113 116 +2.7% 0.97x (?)
Hanoi 18506 18352 -0.8% 1.01x
HashTest 17361 16589 -4.4% 1.05x
Histogram 7756 7749 -0.1% 1.00x (?)
Integrate 643 643 +0.0% 1.00x
IterateData 11989 12106 +1.0% 0.99x
LazilyFilteredArrayContains 865141 863107 -0.2% 1.00x (?)
LazilyFilteredRange 616685 614374 -0.4% 1.00x (?)
LessSubstringSubstringGenericComparable 402 401 -0.2% 1.00x (?)
LinkedList 35441 35397 -0.1% 1.00x (?)
MapReduce 34087 34391 +0.9% 0.99x
MapReduceAnyCollection 34149 34249 +0.3% 1.00x
MapReduceAnyCollectionShort 46135 46436 +0.7% 0.99x (?)
MapReduceClass 37991 38523 +1.4% 0.99x (?)
MapReduceClassShort 50412 49829 -1.2% 1.01x (?)
MapReduceLazyCollection 29719 29760 +0.1% 1.00x
MapReduceLazyCollectionShort 39267 39880 +1.6% 0.98x (?)
MapReduceLazySequence 24621 24832 +0.9% 0.99x
MapReduceSequence 39325 39268 -0.1% 1.00x
MapReduceShort 45088 45311 +0.5% 1.00x (?)
MapReduceString 2416 2435 +0.8% 0.99x (?)
Memset 42170 42186 +0.0% 1.00x (?)
MonteCarloE 854476 889884 +4.1% 0.96x
MonteCarloPi 3666118 3686721 +0.6% 0.99x
NSError 657 650 -1.1% 1.01x (?)
NSStringConversion 399 398 -0.3% 1.00x
NopDeinit 154438 159673 +3.4% 0.97x
ObjectAllocation 1281 1278 -0.2% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 24582 23507 -4.4% 1.05x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 42359 40867 -3.5% 1.04x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 137187 132168 -3.7% 1.04x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 9639 9845 +2.1% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 113864 110034 -3.4% 1.03x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 134162 128424 -4.3% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObject 72637 69201 -4.7% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7789 8050 +3.4% 0.97x (?)
ObjectiveCBridgeFromNSString 3310 3306 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2259 2248 -0.5% 1.00x (?)
ObjectiveCBridgeStubDataAppend 4340 4295 -1.0% 1.01x
ObjectiveCBridgeStubDateAccess 1141 1142 +0.1% 1.00x (?)
ObjectiveCBridgeStubDateMutation 748 720 -3.7% 1.04x
ObjectiveCBridgeStubFromNSDate 4070 4148 +1.9% 0.98x (?)
ObjectiveCBridgeStubFromNSDateRef 4351 4486 +3.1% 0.97x (?)
ObjectiveCBridgeStubFromNSString 632 623 -1.4% 1.01x (?)
ObjectiveCBridgeStubFromNSStringRef 206 209 +1.5% 0.99x
ObjectiveCBridgeStubNSDataAppend 2996 2964 -1.1% 1.01x
ObjectiveCBridgeStubNSDateRefAccess 1328 1352 +1.8% 0.98x
ObjectiveCBridgeStubToArrayOfNSString 26856 26975 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSDate 14148 14216 +0.5% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3131 3136 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSString 1338 1346 +0.6% 0.99x
ObjectiveCBridgeStubToNSStringRef 165 163 -1.2% 1.01x (?)
ObjectiveCBridgeStubURLAppendPath 309017 295898 -4.2% 1.04x (?)
ObjectiveCBridgeStubURLAppendPathRef 305518 313383 +2.6% 0.97x (?)
ObjectiveCBridgeToNSArray 27263 27100 -0.6% 1.01x (?)
ObjectiveCBridgeToNSDictionary 54505 55352 +1.6% 0.98x (?)
ObjectiveCBridgeToNSSet 45018 43207 -4.0% 1.04x (?)
ObjectiveCBridgeToNSString 1120 1138 +1.6% 0.98x (?)
ObserverClosure 6132 6104 -0.5% 1.00x (?)
ObserverForwarderStruct 4448 4445 -0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 7302 7289 -0.2% 1.00x (?)
ObserverUnappliedMethod 8086 7783 -3.7% 1.04x (?)
OpenClose 379 389 +2.6% 0.97x
Phonebook 23139 23290 +0.7% 0.99x
PolymorphicCalls 6285 6239 -0.7% 1.01x (?)
PopFrontArray 9758 9698 -0.6% 1.01x (?)
PopFrontArrayGeneric 8789 8724 -0.7% 1.01x (?)
PopFrontUnsafePointer 10152 10167 +0.1% 1.00x (?)
PrefixAnyCollection 18510 17935 -3.1% 1.03x (?)
PrefixAnySeqCRangeIter 21313 21017 -1.4% 1.01x (?)
PrefixAnySeqCRangeIterLazy 21338 21076 -1.2% 1.01x (?)
PrefixAnySeqCntRange 18304 18960 +3.6% 0.97x
PrefixAnySequence 11129 10942 -1.7% 1.02x
PrefixAnySequenceLazy 11024 10879 -1.3% 1.01x
PrefixArrayLazy 39542 39804 +0.7% 0.99x (?)
PrefixCountableRange 421 420 -0.2% 1.00x
PrefixCountableRangeLazy 37636 37961 +0.9% 0.99x
PrefixSequence 9930 9951 +0.2% 1.00x (?)
PrefixSequenceLazy 10063 9928 -1.3% 1.01x
PrefixWhileAnyCollection 34632 34458 -0.5% 1.01x (?)
PrefixWhileAnyCollectionLazy 20783 20575 -1.0% 1.01x
PrefixWhileAnySeqCntRange 34557 34399 -0.5% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 20699 20651 -0.2% 1.00x (?)
PrefixWhileAnySequence 28255 28339 +0.3% 1.00x
PrefixWhileAnySequenceLazy 11152 11035 -1.0% 1.01x
PrefixWhileArrayLazy 13385 13370 -0.1% 1.00x
PrefixWhileCountableRange 16909 16770 -0.8% 1.01x (?)
PrefixWhileSequence 27258 27128 -0.5% 1.00x
PrefixWhileSequenceLazy 10331 10362 +0.3% 1.00x
Prims 9528 9548 +0.2% 1.00x (?)
PrimsSplit 9571 9533 -0.4% 1.00x (?)
ProtocolDispatch 7714 7971 +3.3% 0.97x
ProtocolDispatch2 476 481 +1.1% 0.99x
RC4 16267 16299 +0.2% 1.00x (?)
RGBHistogram 30108 30270 +0.5% 0.99x (?)
RGBHistogramOfObjects 95224 94800 -0.4% 1.00x (?)
RangeAssignment 4979 4879 -2.0% 1.02x (?)
RangeIterationSigned 15700 15831 +0.8% 0.99x
RangeIterationSigned64 52847 53002 +0.3% 1.00x
RangeIterationUnsigned 46353 48097 +3.8% 0.96x (?)
RecursiveOwnedParameter 9710 9721 +0.1% 1.00x (?)
ReversedArray 40306 39466 -2.1% 1.02x (?)
ReversedBidirectional 69602 70004 +0.6% 0.99x (?)
ReversedDictionary 25062 24981 -0.3% 1.00x
SetExclusiveOr 16672 16604 -0.4% 1.00x
SetExclusiveOr_OfObjects 41437 41716 +0.7% 0.99x
SetIntersect 7478 7444 -0.5% 1.00x
SetIntersect_OfObjects 10061 9925 -1.4% 1.01x (?)
SetIsSubsetOf 1212 1195 -1.4% 1.01x
SetIsSubsetOf_OfObjects 1237 1236 -0.1% 1.00x (?)
SetUnion 10601 10581 -0.2% 1.00x (?)
SetUnion_OfObjects 29650 29712 +0.2% 1.00x
Sim2DArray 40492 40468 -0.1% 1.00x (?)
SortLargeExistentials 15947 15995 +0.3% 1.00x (?)
SortLettersInPlace 2761 2755 -0.2% 1.00x (?)
SortSortedStrings 1363 1376 +1.0% 0.99x
SortStrings 2515 2539 +1.0% 0.99x
SortStringsUnicode 8693 8595 -1.1% 1.01x
StackPromo 88522 87641 -1.0% 1.01x (?)
StaticArray 5139 5277 +2.7% 0.97x
StrComplexWalk 6363 6365 +0.0% 1.00x (?)
StrToInt 93474 91135 -2.5% 1.03x
StringAdder 3284 3265 -0.6% 1.01x
StringEnumRawValueInitialization 12346 12141 -1.7% 1.02x (?)
StringEqualPointerComparison 2699 2699 +0.0% 1.00x
StringFromLongWholeSubstring 187 185 -1.1% 1.01x (?)
StringFromLongWholeSubstringGeneric 190 189 -0.5% 1.01x (?)
StringHasPrefix 2159 2197 +1.8% 0.98x
StringHasPrefixUnicode 17462 17606 +0.8% 0.99x
StringHasSuffix 2303 2229 -3.2% 1.03x
StringHasSuffixUnicode 71762 71682 -0.1% 1.00x
StringInterpolation 12830 12888 +0.5% 1.00x (?)
StringWalk 11923 12069 +1.2% 0.99x
StringWithCString 59734 59774 +0.1% 1.00x (?)
SubstringFromLongString 13 13 +0.0% 1.00x
SubstringFromLongStringGeneric 101 102 +1.0% 0.99x
SuffixAnySeqCRangeIter 38934 38749 -0.5% 1.00x (?)
SuffixAnySeqCRangeIterLazy 39014 38861 -0.4% 1.00x
SuffixAnySeqCntRange 6093 6084 -0.1% 1.00x (?)
SuffixAnySequence 26280 26309 +0.1% 1.00x (?)
SuffixAnySequenceLazy 26402 26363 -0.1% 1.00x (?)
SuffixArrayLazy 13177 13288 +0.8% 0.99x (?)
SuffixCountableRange 145 147 +1.4% 0.99x
SuffixCountableRangeLazy 12560 12692 +1.1% 0.99x (?)
SuffixSequence 25994 26076 +0.3% 1.00x (?)
SuffixSequenceLazy 25953 25980 +0.1% 1.00x (?)
SumUsingReduce 201617 201154 -0.2% 1.00x (?)
SumUsingReduceInto 203498 202930 -0.3% 1.00x
TwoSum 3489 3478 -0.3% 1.00x (?)
TypeFlood 146 146 +0.0% 1.00x
UTF8Decode 33435 33494 +0.2% 1.00x
Walsh 11233 11278 +0.4% 1.00x
XorLoop 22112 22129 +0.1% 1.00x (?)
Added (4)
TEST MIN MAX MEAN MAX_RSS
DictionarySubscriptDefaultMutation 2060 2062 2061 11767808
DictionarySubscriptDefaultMutationArray 2327 2454 2388 11870208
DictionarySubscriptDefaultMutationArrayOfObjects 8504 9224 8747 12120064
DictionarySubscriptDefaultMutationOfObjects 5372 5483 5437 11780096
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 8-Core Intel Xeon E5
  Processor Speed: 3 GHz
  Number of Processors: 1
  Total Number of Cores: 8
  L2 Cache (per Core): 256 KB
  L3 Cache: 25 MB
  Memory: 64 GB

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Nov 4, 2017

Build comment file:

Optimized (O)

Regression (8)
TEST OLD NEW DELTA SPEEDUP
Sim2DArray 346 437 +26.3% 0.79x
PopFrontArray 1097 1268 +15.6% 0.87x (?)
SuffixAnySeqCntRange 14 15 +7.1% 0.93x
StringEqualPointerComparison 358 383 +7.0% 0.93x
RangeAssignment 330 350 +6.1% 0.94x (?)
MapReduce 354 375 +5.9% 0.94x (?)
LazilyFilteredArrayContains 18709 19764 +5.6% 0.95x (?)
PrefixWhileSequence 316 333 +5.4% 0.95x (?)
Improvement (30)
TEST OLD NEW DELTA SPEEDUP
FrequenciesUsingReduceInto 4021 2738 -31.9% 1.47x
FrequenciesUsingReduce 7209 5902 -18.1% 1.22x
Calculator 35 29 -17.1% 1.21x
ArrayAppendAscii 22951 19108 -16.7% 1.20x (?)
ArrayValueProp2 6 5 -16.7% 1.20x
ArrayValueProp 6 5 -16.7% 1.20x
ArrayAppendLatin1 47210 41550 -12.0% 1.14x
AnyHashableWithAClass 77184 68609 -11.1% 1.12x
AngryPhonebook 3145 2874 -8.6% 1.09x (?)
ArrayAppendGenericStructs 1242 1136 -8.5% 1.09x
ArrayAppendFromGeneric 616 565 -8.3% 1.09x
ArrayAppendArrayOfInt 613 563 -8.2% 1.09x
Array2D 2045 1879 -8.1% 1.09x (?)
ArrayAppend 1097 1010 -7.9% 1.09x
StrToInt 1818 1679 -7.6% 1.08x
ArrayAppendOptionals 1227 1135 -7.5% 1.08x
ObjectiveCBridgeStubFromNSStringRef 149 138 -7.4% 1.08x
ArrayAppendLazyMap 1002 930 -7.2% 1.08x (?)
Phonebook 5909 5491 -7.1% 1.08x
Hanoi 3546 3304 -6.8% 1.07x
ArraySetElement 487 454 -6.8% 1.07x
Chars 632 590 -6.6% 1.07x
ArrayAppendRepeatCol 1011 947 -6.3% 1.07x (?)
DropFirstSequenceLazy 1954 1835 -6.1% 1.06x
PrefixSequenceLazy 1465 1377 -6.0% 1.06x
ObjectiveCBridgeStubNSDateRefAccess 333 313 -6.0% 1.06x
ArraySubscript 1486 1406 -5.4% 1.06x (?)
Walsh 391 371 -5.1% 1.05x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2052 1950 -5.0% 1.05x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 2551 2425 -4.9% 1.05x (?)
No Changes (296)
TEST OLD NEW DELTA SPEEDUP
ArrayAppendReserved 819 811 -1.0% 1.01x (?)
ArrayAppendSequence 997 966 -3.1% 1.03x (?)
ArrayAppendStrings 16237 15764 -2.9% 1.03x (?)
ArrayAppendToFromGeneric 583 565 -3.1% 1.03x (?)
ArrayAppendToGeneric 582 564 -3.1% 1.03x
ArrayAppendUTF16 42958 42325 -1.5% 1.01x (?)
ArrayInClass 62 61 -1.6% 1.02x (?)
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD 208 207 -0.5% 1.00x (?)
ArrayOfGenericRef 3863 3793 -1.8% 1.02x (?)
ArrayOfPOD 156 156 +0.0% 1.00x
ArrayOfRef 3791 3763 -0.7% 1.01x (?)
ArrayPlusEqualArrayOfInt 567 565 -0.4% 1.00x (?)
ArrayPlusEqualFiveElementCollection 4574 4490 -1.8% 1.02x (?)
ArrayPlusEqualSingleElementCollection 1034 1023 -1.1% 1.01x (?)
ArrayPlusEqualThreeElements 1629 1590 -2.4% 1.02x (?)
ArrayValueProp3 5 5 +0.0% 1.00x
ArrayValueProp4 5 5 +0.0% 1.00x
BitCount 138 136 -1.4% 1.01x (?)
ByteSwap 113 109 -3.5% 1.04x (?)
CStringLongAscii 4767 4721 -1.0% 1.01x (?)
CStringLongNonAscii 2247 2143 -4.6% 1.05x (?)
CStringShortAscii 4701 4646 -1.2% 1.01x (?)
CaptureProp 4012 4214 +5.0% 0.95x (?)
CharIndexing_ascii_unicodeScalars 13519 13477 -0.3% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 10988 10730 -2.3% 1.02x (?)
CharIndexing_chinese_unicodeScalars 10054 10216 +1.6% 0.98x (?)
CharIndexing_chinese_unicodeScalars_Backwards 8346 8152 -2.3% 1.02x (?)
CharIndexing_japanese_unicodeScalars 16028 16089 +0.4% 1.00x (?)
CharIndexing_japanese_unicodeScalars_Backwards 13123 12672 -3.4% 1.04x (?)
CharIndexing_korean_unicodeScalars 12927 13093 +1.3% 0.99x (?)
CharIndexing_korean_unicodeScalars_Backwards 10692 10273 -3.9% 1.04x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 2472 2499 +1.1% 0.99x (?)
CharIndexing_punctuated_unicodeScalars 3065 3097 +1.0% 0.99x (?)
CharIndexing_russian_unicodeScalars 11143 11227 +0.8% 0.99x (?)
CharIndexing_russian_unicodeScalars_Backwards 9185 8815 -4.0% 1.04x (?)
CharIndexing_tweet_unicodeScalars 26139 26476 +1.3% 0.99x (?)
CharIndexing_tweet_unicodeScalars_Backwards 21659 21148 -2.4% 1.02x (?)
CharIndexing_utf16_unicodeScalars 76864 77003 +0.2% 1.00x (?)
CharIndexing_utf16_unicodeScalars_Backwards 57187 56953 -0.4% 1.00x (?)
CharIteration_ascii_unicodeScalars 15430 15133 -1.9% 1.02x (?)
CharIteration_ascii_unicodeScalars_Backwards 16212 15889 -2.0% 1.02x (?)
CharIteration_chinese_unicodeScalars 11780 11495 -2.4% 1.02x (?)
CharIteration_chinese_unicodeScalars_Backwards 12202 11813 -3.2% 1.03x (?)
CharIteration_japanese_unicodeScalars 18844 18183 -3.5% 1.04x
CharIteration_japanese_unicodeScalars_Backwards 19373 18531 -4.3% 1.05x (?)
CharIteration_korean_unicodeScalars 14971 14726 -1.6% 1.02x (?)
CharIteration_korean_unicodeScalars_Backwards 15716 15156 -3.6% 1.04x
CharIteration_punctuatedJapanese_unicodeScalars 2771 2755 -0.6% 1.01x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2878 2808 -2.4% 1.02x (?)
CharIteration_punctuated_unicodeScalars 3536 3449 -2.5% 1.03x (?)
CharIteration_punctuated_unicodeScalars_Backwards 3609 3505 -2.9% 1.03x (?)
CharIteration_russian_unicodeScalars 12838 12647 -1.5% 1.02x (?)
CharIteration_russian_unicodeScalars_Backwards 13405 12949 -3.4% 1.04x (?)
CharIteration_tweet_unicodeScalars 30270 29900 -1.2% 1.01x (?)
CharIteration_tweet_unicodeScalars_Backwards 31788 31413 -1.2% 1.01x (?)
CharIteration_utf16_unicodeScalars 73992 74433 +0.6% 0.99x (?)
CharIteration_utf16_unicodeScalars_Backwards 92082 92256 +0.2% 1.00x (?)
CharacterLiteralsLarge 5750 5697 -0.9% 1.01x (?)
CharacterLiteralsSmall 389 388 -0.3% 1.00x (?)
ClassArrayGetter 13 13 +0.0% 1.00x
DeadArray 176 176 +0.0% 1.00x
Dictionary 555 545 -1.8% 1.02x (?)
Dictionary2 1767 1769 +0.1% 1.00x (?)
Dictionary2OfObjects 3104 3059 -1.4% 1.01x (?)
Dictionary3 449 445 -0.9% 1.01x (?)
Dictionary3OfObjects 784 787 +0.4% 1.00x (?)
DictionaryBridge 2481 2473 -0.3% 1.00x (?)
DictionaryGroup 258 259 +0.4% 1.00x (?)
DictionaryGroupOfObjects 1736 1694 -2.4% 1.02x (?)
DictionaryLiteral 1443 1428 -1.0% 1.01x (?)
DictionaryOfObjects 2133 2138 +0.2% 1.00x (?)
DictionaryRemove 2447 2443 -0.2% 1.00x (?)
DictionaryRemoveOfObjects 21621 21575 -0.2% 1.00x (?)
DictionarySwap 406 410 +1.0% 0.99x (?)
DictionarySwapOfObjects 7013 6970 -0.6% 1.01x (?)
DropFirstAnyCollection 52 52 +0.0% 1.00x
DropFirstAnyCollectionLazy 75047 72994 -2.7% 1.03x (?)
DropFirstAnySeqCRangeIter 27648 27867 +0.8% 0.99x (?)
DropFirstAnySeqCRangeIterLazy 27754 28332 +2.1% 0.98x (?)
DropFirstAnySeqCntRange 48 48 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 48 48 +0.0% 1.00x
DropFirstAnySequence 5870 5727 -2.4% 1.02x (?)
DropFirstAnySequenceLazy 5929 5793 -2.3% 1.02x (?)
DropFirstArray 29 29 +0.0% 1.00x
DropFirstArrayLazy 29 29 +0.0% 1.00x
DropFirstCountableRange 17 17 +0.0% 1.00x
DropFirstCountableRangeLazy 17 17 +0.0% 1.00x
DropFirstSequence 1858 1905 +2.5% 0.98x (?)
DropLastAnyCollection 20 20 +0.0% 1.00x
DropLastAnyCollectionLazy 24441 24205 -1.0% 1.01x (?)
DropLastAnySeqCRangeIter 4477 4441 -0.8% 1.01x (?)
DropLastAnySeqCRangeIterLazy 4443 4429 -0.3% 1.00x (?)
DropLastAnySeqCntRange 15 15 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 15 15 +0.0% 1.00x
DropLastAnySequence 6414 6306 -1.7% 1.02x (?)
DropLastAnySequenceLazy 6324 6318 -0.1% 1.00x (?)
DropLastArray 7 7 +0.0% 1.00x
DropLastArrayLazy 7 7 +0.0% 1.00x
DropLastCountableRange 6 6 +0.0% 1.00x
DropLastCountableRangeLazy 6 6 +0.0% 1.00x
DropLastSequence 572 593 +3.7% 0.96x (?)
DropLastSequenceLazy 585 605 +3.4% 0.97x (?)
DropWhileAnyCollection 64 64 +0.0% 1.00x
DropWhileAnyCollectionLazy 85 85 +0.0% 1.00x
DropWhileAnySeqCRangeIter 21126 20662 -2.2% 1.02x (?)
DropWhileAnySeqCRangeIterLazy 84 83 -1.2% 1.01x (?)
DropWhileAnySeqCntRange 60 60 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 83 83 +0.0% 1.00x
DropWhileAnySequence 5704 5661 -0.8% 1.01x (?)
DropWhileAnySequenceLazy 1876 1876 +0.0% 1.00x
DropWhileArray 41 41 +0.0% 1.00x
DropWhileArrayLazy 77 77 +0.0% 1.00x
DropWhileCountableRange 18 18 +0.0% 1.00x
DropWhileCountableRangeLazy 66 66 +0.0% 1.00x
DropWhileSequence 1544 1520 -1.6% 1.02x
DropWhileSequenceLazy 44 44 +0.0% 1.00x
EqualStringSubstring 376 368 -2.1% 1.02x (?)
EqualSubstringString 380 375 -1.3% 1.01x (?)
EqualSubstringSubstring 380 380 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 384 377 -1.8% 1.02x (?)
ErrorHandling 1971 1973 +0.1% 1.00x (?)
ExclusivityGlobal 2 2 +0.0% 1.00x
ExclusivityInMatSet 17 17 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1247 1239 -0.6% 1.01x (?)
FilterEvenUsingReduceInto 142 142 +0.0% 1.00x
HashTest 1668 1663 -0.3% 1.00x (?)
Histogram 274 283 +3.3% 0.97x (?)
Integrate 249 248 -0.4% 1.00x (?)
IterateData 1359 1327 -2.4% 1.02x (?)
Join 368 363 -1.4% 1.01x (?)
LazilyFilteredArrays 63054 63414 +0.6% 0.99x (?)
LazilyFilteredRange 3467 3424 -1.2% 1.01x (?)
LessSubstringSubstring 383 381 -0.5% 1.01x (?)
LessSubstringSubstringGenericComparable 391 391 +0.0% 1.00x
LinkedList 6583 6559 -0.4% 1.00x (?)
MapReduceAnyCollection 393 385 -2.0% 1.02x (?)
MapReduceAnyCollectionShort 2005 2008 +0.1% 1.00x (?)
MapReduceClass 2889 2890 +0.0% 1.00x (?)
MapReduceClassShort 4310 4296 -0.3% 1.00x (?)
MapReduceLazyCollection 12 12 +0.0% 1.00x
MapReduceLazyCollectionShort 4 4 +0.0% 1.00x
MapReduceLazySequence 85 85 +0.0% 1.00x
MapReduceSequence 415 415 +0.0% 1.00x
MapReduceShort 1873 1899 +1.4% 0.99x (?)
MapReduceShortString 21 20 -4.8% 1.05x (?)
MapReduceString 105 102 -2.9% 1.03x (?)
Memset 221 221 +0.0% 1.00x
MonteCarloE 9730 9746 +0.2% 1.00x (?)
MonteCarloPi 41519 41464 -0.1% 1.00x (?)
NSDictionaryCastToSwift 4972 4956 -0.3% 1.00x (?)
NSError 285 283 -0.7% 1.01x (?)
NSStringConversion 349 356 +2.0% 0.98x (?)
NopDeinit 22299 22256 -0.2% 1.00x (?)
ObjectAllocation 169 168 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObject 21444 21144 -1.4% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 3392 3389 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 39308 38236 -2.7% 1.03x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 34047 33941 -0.3% 1.00x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 118982 120273 +1.1% 0.99x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5355 5257 -1.8% 1.02x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 87152 85458 -1.9% 1.02x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 97278 97406 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObject 61836 62303 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4184 4173 -0.3% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 64450 64402 -0.1% 1.00x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 67362 65975 -2.1% 1.02x (?)
ObjectiveCBridgeFromNSString 974 987 +1.3% 0.99x (?)
ObjectiveCBridgeFromNSStringForced 1866 1840 -1.4% 1.01x (?)
ObjectiveCBridgeStubDataAppend 3665 3707 +1.1% 0.99x (?)
ObjectiveCBridgeStubDateAccess 174 176 +1.1% 0.99x (?)
ObjectiveCBridgeStubDateMutation 259 257 -0.8% 1.01x (?)
ObjectiveCBridgeStubFromArrayOfNSString 25141 24736 -1.6% 1.02x (?)
ObjectiveCBridgeStubFromNSDate 3726 3714 -0.3% 1.00x (?)
ObjectiveCBridgeStubFromNSDateRef 4094 4097 +0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSString 551 526 -4.5% 1.05x (?)
ObjectiveCBridgeStubNSDataAppend 2411 2367 -1.8% 1.02x (?)
ObjectiveCBridgeStubNSDateMutationRef 12473 12205 -2.1% 1.02x (?)
ObjectiveCBridgeStubToArrayOfNSString 28304 28495 +0.7% 0.99x (?)
ObjectiveCBridgeStubToNSDate 13592 13390 -1.5% 1.02x (?)
ObjectiveCBridgeStubToNSDateRef 3092 3011 -2.6% 1.03x (?)
ObjectiveCBridgeStubToNSString 1418 1413 -0.4% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 110 110 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 213966 212366 -0.7% 1.01x (?)
ObjectiveCBridgeStubURLAppendPathRef 211375 210901 -0.2% 1.00x (?)
ObjectiveCBridgeToNSArray 28500 28566 +0.2% 1.00x (?)
ObjectiveCBridgeToNSDictionary 45164 45040 -0.3% 1.00x (?)
ObjectiveCBridgeToNSSet 38940 38562 -1.0% 1.01x (?)
ObjectiveCBridgeToNSString 1200 1198 -0.2% 1.00x (?)
ObserverClosure 2193 2202 +0.4% 1.00x (?)
ObserverForwarderStruct 849 869 +2.4% 0.98x (?)
ObserverPartiallyAppliedMethod 3640 3624 -0.4% 1.00x (?)
ObserverUnappliedMethod 2348 2322 -1.1% 1.01x (?)
OpenClose 3 3 +0.0% 1.00x
PolymorphicCalls 16 16 +0.0% 1.00x
PopFrontArrayGeneric 1220 1254 +2.8% 0.97x (?)
PopFrontUnsafePointer 5748 5747 -0.0% 1.00x (?)
PrefixAnyCollection 52 52 +0.0% 1.00x
PrefixAnyCollectionLazy 72811 72250 -0.8% 1.01x (?)
PrefixAnySeqCRangeIter 21455 21400 -0.3% 1.00x (?)
PrefixAnySeqCRangeIterLazy 21966 21358 -2.8% 1.03x (?)
PrefixAnySeqCntRange 48 48 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 48 48 +0.0% 1.00x
PrefixAnySequence 4962 4854 -2.2% 1.02x (?)
PrefixAnySequenceLazy 5023 4981 -0.8% 1.01x (?)
PrefixArray 29 29 +0.0% 1.00x
PrefixArrayLazy 29 29 +0.0% 1.00x
PrefixCountableRange 17 17 +0.0% 1.00x
PrefixCountableRangeLazy 17 17 +0.0% 1.00x
PrefixSequence 1395 1430 +2.5% 0.98x
PrefixWhileAnyCollection 88 87 -1.1% 1.01x
PrefixWhileAnyCollectionLazy 62 62 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 12054 12056 +0.0% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 62 62 +0.0% 1.00x
PrefixWhileAnySeqCntRange 83 83 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 62 62 +0.0% 1.00x
PrefixWhileAnySequence 13403 13408 +0.0% 1.00x (?)
PrefixWhileAnySequenceLazy 1394 1366 -2.0% 1.02x (?)
PrefixWhileArray 65 65 +0.0% 1.00x
PrefixWhileArrayLazy 36 35 -2.8% 1.03x (?)
PrefixWhileCountableRange 28 28 +0.0% 1.00x
PrefixWhileCountableRangeLazy 17 17 +0.0% 1.00x
PrefixWhileSequenceLazy 26 26 +0.0% 1.00x
Prims 706 710 +0.6% 0.99x (?)
PrimsSplit 722 716 -0.8% 1.01x (?)
ProtocolDispatch 2964 2944 -0.7% 1.01x (?)
ProtocolDispatch2 134 132 -1.5% 1.02x (?)
RC4 165 164 -0.6% 1.01x (?)
RGBHistogram 2110 2123 +0.6% 0.99x (?)
RGBHistogramOfObjects 22059 22019 -0.2% 1.00x (?)
RangeIterationSigned 131 131 +0.0% 1.00x
RangeIterationSigned64 149 147 -1.3% 1.01x (?)
RangeIterationUnsigned 148 147 -0.7% 1.01x (?)
RecursiveOwnedParameter 2169 2184 +0.7% 0.99x (?)
ReversedArray 43 44 +2.3% 0.98x (?)
ReversedBidirectional 27432 27486 +0.2% 1.00x (?)
ReversedDictionary 91 89 -2.2% 1.02x (?)
SetExclusiveOr 2700 2716 +0.6% 0.99x (?)
SetExclusiveOr_OfObjects 7760 7817 +0.7% 0.99x (?)
SetIntersect 263 253 -3.8% 1.04x (?)
SetIntersect_OfObjects 1627 1616 -0.7% 1.01x (?)
SetIsSubsetOf 277 277 +0.0% 1.00x
SetIsSubsetOf_OfObjects 346 345 -0.3% 1.00x
SetUnion 2401 2402 +0.0% 1.00x (?)
SetUnion_OfObjects 6425 6442 +0.3% 1.00x (?)
SevenBoom 1450 1435 -1.0% 1.01x (?)
SortLargeExistentials 8761 8571 -2.2% 1.02x (?)
SortLettersInPlace 1075 1075 +0.0% 1.00x
SortSortedStrings 874 840 -3.9% 1.04x
SortStrings 1642 1587 -3.3% 1.03x
SortStringsUnicode 8219 8010 -2.5% 1.03x (?)
StackPromo 20860 21238 +1.8% 0.98x (?)
StaticArray 5 5 +0.0% 1.00x
StrComplexWalk 1618 1556 -3.8% 1.04x (?)
StringAdder 3348 3337 -0.3% 1.00x (?)
StringBuilder 963 969 +0.6% 0.99x (?)
StringBuilderLong 894 881 -1.5% 1.01x (?)
StringEdits 166020 166604 +0.4% 1.00x (?)
StringEnumRawValueInitialization 763 770 +0.9% 0.99x (?)
StringFromLongWholeSubstring 167 166 -0.6% 1.01x (?)
StringFromLongWholeSubstringGeneric 83 83 +0.0% 1.00x
StringHasPrefix 8 8 +0.0% 1.00x
StringHasPrefixUnicode 14340 13898 -3.1% 1.03x (?)
StringHasSuffix 8 8 +0.0% 1.00x
StringHasSuffixUnicode 58934 59025 +0.2% 1.00x (?)
StringInterpolation 10465 10308 -1.5% 1.02x (?)
StringMatch 7597 7347 -3.3% 1.03x
StringUTF16Builder 1821 1836 +0.8% 0.99x (?)
StringWalk 1474 1440 -2.3% 1.02x (?)
StringWithCString 59135 60430 +2.2% 0.98x (?)
SubstringComparable 1606 1573 -2.1% 1.02x (?)
SubstringEqualString 1419 1411 -0.6% 1.01x (?)
SubstringEquatable 3631 3593 -1.0% 1.01x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 70 70 +0.0% 1.00x
SuffixAnyCollection 20 20 +0.0% 1.00x
SuffixAnyCollectionLazy 24416 24303 -0.5% 1.00x (?)
SuffixAnySeqCRangeIter 4720 4721 +0.0% 1.00x (?)
SuffixAnySeqCRangeIterLazy 4720 4722 +0.0% 1.00x (?)
SuffixAnySeqCntRangeLazy 15 15 +0.0% 1.00x
SuffixAnySequence 6289 6289 +0.0% 1.00x
SuffixAnySequenceLazy 6336 6318 -0.3% 1.00x (?)
SuffixArray 7 7 +0.0% 1.00x
SuffixArrayLazy 7 7 +0.0% 1.00x
SuffixCountableRange 6 6 +0.0% 1.00x
SuffixCountableRangeLazy 6 6 +0.0% 1.00x
SuffixSequence 4341 4330 -0.3% 1.00x (?)
SuffixSequenceLazy 4343 4330 -0.3% 1.00x (?)
SumUsingReduce 95 94 -1.1% 1.01x (?)
SumUsingReduceInto 93 93 +0.0% 1.00x
SuperChars 79719 79811 +0.1% 1.00x (?)
TwoSum 911 907 -0.4% 1.00x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 241 245 +1.7% 0.98x (?)
XorLoop 326 326 +0.0% 1.00x
Added (4)
TEST MIN MAX MEAN MAX_RSS
DictionarySubscriptDefaultMutation 136 144 140 9911091
DictionarySubscriptDefaultMutationArray 487 502 491 10348544
DictionarySubscriptDefaultMutationArrayOfObjects 3404 3525 3445 10846208
DictionarySubscriptDefaultMutationOfObjects 1288 1352 1312 9947546

Unoptimized (Onone)

Regression (5)
TEST OLD NEW DELTA SPEEDUP
ArrayAppend 4706 5082 +8.0% 0.93x (?)
CharacterLiteralsSmall 678 731 +7.8% 0.93x
Calculator 1084 1162 +7.2% 0.93x
ArrayAppendReserved 4483 4796 +7.0% 0.93x
StringEqualPointerComparison 2530 2671 +5.6% 0.95x
Improvement (8)
TEST OLD NEW DELTA SPEEDUP
FrequenciesUsingReduceInto 8972 5743 -36.0% 1.56x
FrequenciesUsingReduce 16141 12888 -20.2% 1.25x
ObjectiveCBridgeStubDateMutation 768 680 -11.5% 1.13x
ArrayOfGenericPOD 1293 1214 -6.1% 1.07x (?)
ArrayAppendArrayOfInt 657 617 -6.1% 1.06x
SevenBoom 1671 1571 -6.0% 1.06x (?)
SuffixSequence 30049 28268 -5.9% 1.06x
OpenClose 413 393 -4.8% 1.05x
No Changes (321)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 4810 4766 -0.9% 1.01x (?)
AnyHashableWithAClass 86940 84259 -3.1% 1.03x (?)
Array2D 613771 605335 -1.4% 1.01x
ArrayAppendAscii 50204 52088 +3.8% 0.96x
ArrayAppendFromGeneric 640 638 -0.3% 1.00x (?)
ArrayAppendGenericStructs 1197 1208 +0.9% 0.99x (?)
ArrayAppendLatin1 75948 77491 +2.0% 0.98x (?)
ArrayAppendLazyMap 212971 215223 +1.1% 0.99x (?)
ArrayAppendOptionals 1228 1229 +0.1% 1.00x (?)
ArrayAppendRepeatCol 227675 225633 -0.9% 1.01x (?)
ArrayAppendSequence 72877 73606 +1.0% 0.99x (?)
ArrayAppendStrings 16406 16277 -0.8% 1.01x (?)
ArrayAppendToFromGeneric 639 620 -3.0% 1.03x
ArrayAppendToGeneric 622 621 -0.2% 1.00x
ArrayAppendUTF16 76555 76513 -0.1% 1.00x (?)
ArrayInClass 6402 6264 -2.2% 1.02x
ArrayLiteral 1750 1695 -3.1% 1.03x
ArrayOfGenericRef 9978 9703 -2.8% 1.03x
ArrayOfPOD 712 710 -0.3% 1.00x (?)
ArrayOfRef 8995 9223 +2.5% 0.98x (?)
ArrayPlusEqualArrayOfInt 638 636 -0.3% 1.00x (?)
ArrayPlusEqualFiveElementCollection 293100 291678 -0.5% 1.00x (?)
ArrayPlusEqualSingleElementCollection 289219 286610 -0.9% 1.01x (?)
ArrayPlusEqualThreeElements 10910 10730 -1.6% 1.02x (?)
ArraySetElement 4521 4521 +0.0% 1.00x
ArraySubscript 86345 85797 -0.6% 1.01x (?)
ArrayValueProp 3469 3445 -0.7% 1.01x (?)
ArrayValueProp2 17729 17768 +0.2% 1.00x (?)
ArrayValueProp3 4116 4146 +0.7% 0.99x (?)
ArrayValueProp4 4092 4105 +0.3% 1.00x (?)
BitCount 1443 1443 +0.0% 1.00x
ByteSwap 3907 3885 -0.6% 1.01x (?)
CStringLongAscii 4620 4701 +1.8% 0.98x (?)
CStringLongNonAscii 2352 2400 +2.0% 0.98x (?)
CStringShortAscii 8431 8578 +1.7% 0.98x (?)
CaptureProp 113238 112694 -0.5% 1.00x
CharIndexing_ascii_unicodeScalars 470101 461785 -1.8% 1.02x (?)
CharIndexing_ascii_unicodeScalars_Backwards 502615 515801 +2.6% 0.97x
CharIndexing_chinese_unicodeScalars 354275 353483 -0.2% 1.00x (?)
CharIndexing_chinese_unicodeScalars_Backwards 386049 389242 +0.8% 0.99x (?)
CharIndexing_japanese_unicodeScalars 560876 553080 -1.4% 1.01x (?)
CharIndexing_japanese_unicodeScalars_Backwards 618273 627668 +1.5% 0.99x
CharIndexing_korean_unicodeScalars 456363 452645 -0.8% 1.01x (?)
CharIndexing_korean_unicodeScalars_Backwards 486730 501325 +3.0% 0.97x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 81041 80977 -0.1% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 86296 88829 +2.9% 0.97x (?)
CharIndexing_punctuated_unicodeScalars 102921 102546 -0.4% 1.00x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 109468 110862 +1.3% 0.99x
CharIndexing_russian_unicodeScalars 400704 389825 -2.7% 1.03x (?)
CharIndexing_russian_unicodeScalars_Backwards 415980 426604 +2.6% 0.98x (?)
CharIndexing_tweet_unicodeScalars 926624 928110 +0.2% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 994669 1019611 +2.5% 0.98x (?)
CharIndexing_utf16_unicodeScalars 532167 526839 -1.0% 1.01x
CharIndexing_utf16_unicodeScalars_Backwards 552988 575554 +4.1% 0.96x (?)
CharIteration_ascii_unicodeScalars 177826 178005 +0.1% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 317441 317382 -0.0% 1.00x (?)
CharIteration_chinese_unicodeScalars 134693 136603 +1.4% 0.99x (?)
CharIteration_chinese_unicodeScalars_Backwards 235557 244025 +3.6% 0.97x (?)
CharIteration_japanese_unicodeScalars 214370 223071 +4.1% 0.96x
CharIteration_japanese_unicodeScalars_Backwards 381440 379178 -0.6% 1.01x (?)
CharIteration_korean_unicodeScalars 173696 173701 +0.0% 1.00x (?)
CharIteration_korean_unicodeScalars_Backwards 308169 307220 -0.3% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 31569 32435 +2.7% 0.97x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 55564 54573 -1.8% 1.02x (?)
CharIteration_punctuated_unicodeScalars 39746 40835 +2.7% 0.97x (?)
CharIteration_punctuated_unicodeScalars_Backwards 69899 69031 -1.2% 1.01x (?)
CharIteration_russian_unicodeScalars 153066 148358 -3.1% 1.03x (?)
CharIteration_russian_unicodeScalars_Backwards 258560 264831 +2.4% 0.98x (?)
CharIteration_tweet_unicodeScalars 352356 349989 -0.7% 1.01x (?)
CharIteration_tweet_unicodeScalars_Backwards 614956 639688 +4.0% 0.96x (?)
CharIteration_utf16_unicodeScalars 196645 196080 -0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars_Backwards 383427 385545 +0.6% 0.99x (?)
CharacterLiteralsLarge 5996 5976 -0.3% 1.00x
Chars 48515 48481 -0.1% 1.00x (?)
ClassArrayGetter 1013 1015 +0.2% 1.00x
DeadArray 107927 106775 -1.1% 1.01x (?)
Dictionary 3106 3110 +0.1% 1.00x (?)
Dictionary2 3242 3230 -0.4% 1.00x (?)
Dictionary2OfObjects 5888 5834 -0.9% 1.01x (?)
Dictionary3 1320 1307 -1.0% 1.01x (?)
Dictionary3OfObjects 2259 2282 +1.0% 0.99x (?)
DictionaryBridge 2572 2600 +1.1% 0.99x (?)
DictionaryGroup 5328 5221 -2.0% 1.02x (?)
DictionaryGroupOfObjects 7971 8207 +3.0% 0.97x (?)
DictionaryLiteral 8361 8374 +0.2% 1.00x (?)
DictionaryOfObjects 6609 6479 -2.0% 1.02x (?)
DictionaryRemove 21208 20833 -1.8% 1.02x (?)
DictionaryRemoveOfObjects 57275 57844 +1.0% 0.99x (?)
DictionarySwap 5167 4994 -3.3% 1.03x
DictionarySwapOfObjects 22710 22389 -1.4% 1.01x (?)
DropFirstAnyCollection 20032 20027 -0.0% 1.00x (?)
DropFirstAnyCollectionLazy 137348 135227 -1.5% 1.02x (?)
DropFirstAnySeqCRangeIter 29765 29625 -0.5% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 30182 30236 +0.2% 1.00x (?)
DropFirstAnySeqCntRange 20500 20637 +0.7% 0.99x (?)
DropFirstAnySeqCntRangeLazy 20194 20114 -0.4% 1.00x (?)
DropFirstAnySequence 14588 14547 -0.3% 1.00x (?)
DropFirstAnySequenceLazy 14634 14187 -3.1% 1.03x
DropFirstArray 5987 5906 -1.4% 1.01x
DropFirstArrayLazy 44503 43453 -2.4% 1.02x (?)
DropFirstCountableRange 470 469 -0.2% 1.00x (?)
DropFirstCountableRangeLazy 41033 40592 -1.1% 1.01x (?)
DropFirstSequence 13510 13423 -0.6% 1.01x (?)
DropFirstSequenceLazy 13484 13403 -0.6% 1.01x
DropLastAnyCollection 6672 6673 +0.0% 1.00x (?)
DropLastAnyCollectionLazy 46037 45398 -1.4% 1.01x (?)
DropLastAnySeqCRangeIter 45413 44902 -1.1% 1.01x (?)
DropLastAnySeqCRangeIterLazy 45879 46532 +1.4% 0.99x (?)
DropLastAnySeqCntRange 6800 6680 -1.8% 1.02x
DropLastAnySeqCntRangeLazy 6763 6724 -0.6% 1.01x (?)
DropLastAnySequence 31811 31777 -0.1% 1.00x (?)
DropLastAnySequenceLazy 31225 31378 +0.5% 1.00x (?)
DropLastArray 2048 1986 -3.0% 1.03x
DropLastArrayLazy 14684 14913 +1.6% 0.98x (?)
DropLastCountableRange 161 163 +1.2% 0.99x (?)
DropLastCountableRangeLazy 13824 13515 -2.2% 1.02x (?)
DropLastSequence 31955 31443 -1.6% 1.02x (?)
DropLastSequenceLazy 31504 30856 -2.1% 1.02x (?)
DropWhileAnyCollection 25941 25792 -0.6% 1.01x (?)
DropWhileAnyCollectionLazy 28914 27948 -3.3% 1.03x
DropWhileAnySeqCRangeIter 31717 31229 -1.5% 1.02x (?)
DropWhileAnySeqCRangeIterLazy 28528 27871 -2.3% 1.02x
DropWhileAnySeqCntRange 26468 26417 -0.2% 1.00x (?)
DropWhileAnySeqCntRangeLazy 28495 28183 -1.1% 1.01x (?)
DropWhileAnySequence 15899 15994 +0.6% 0.99x (?)
DropWhileAnySequenceLazy 13665 13531 -1.0% 1.01x (?)
DropWhileArray 9803 9706 -1.0% 1.01x
DropWhileArrayLazy 16645 16612 -0.2% 1.00x (?)
DropWhileCountableRange 6613 6469 -2.2% 1.02x (?)
DropWhileCountableRangeLazy 27692 27191 -1.8% 1.02x (?)
DropWhileSequence 15441 15161 -1.8% 1.02x (?)
DropWhileSequenceLazy 12512 12336 -1.4% 1.01x
EqualStringSubstring 680 668 -1.8% 1.02x (?)
EqualSubstringString 685 680 -0.7% 1.01x (?)
EqualSubstringSubstring 793 792 -0.1% 1.00x (?)
EqualSubstringSubstringGenericEquatable 425 426 +0.2% 1.00x
ErrorHandling 6829 6779 -0.7% 1.01x (?)
ExclusivityGlobal 175 181 +3.4% 0.97x
ExclusivityInMatSet 306 303 -1.0% 1.01x (?)
ExclusivityIndependent 121 120 -0.8% 1.01x (?)
FilterEvenUsingReduce 4130 4051 -1.9% 1.02x (?)
FilterEvenUsingReduceInto 2369 2414 +1.9% 0.98x (?)
Hanoi 20008 19654 -1.8% 1.02x (?)
HashTest 17163 16842 -1.9% 1.02x (?)
Histogram 8150 8332 +2.2% 0.98x (?)
Integrate 687 676 -1.6% 1.02x (?)
IterateData 13316 13204 -0.8% 1.01x (?)
Join 1465 1466 +0.1% 1.00x (?)
LazilyFilteredArrayContains 952539 944103 -0.9% 1.01x (?)
LazilyFilteredArrays 1685545 1679320 -0.4% 1.00x (?)
LazilyFilteredRange 690001 699595 +1.4% 0.99x (?)
LessSubstringSubstring 795 793 -0.3% 1.00x (?)
LessSubstringSubstringGenericComparable 440 443 +0.7% 0.99x
LinkedList 37971 38306 +0.9% 0.99x (?)
MapReduce 36556 36534 -0.1% 1.00x (?)
MapReduceAnyCollection 37441 36952 -1.3% 1.01x (?)
MapReduceAnyCollectionShort 50305 49932 -0.7% 1.01x
MapReduceClass 41180 42649 +3.6% 0.97x
MapReduceClassShort 52783 52391 -0.7% 1.01x (?)
MapReduceLazyCollection 32790 32263 -1.6% 1.02x (?)
MapReduceLazyCollectionShort 42925 42186 -1.7% 1.02x (?)
MapReduceLazySequence 27649 27446 -0.7% 1.01x (?)
MapReduceSequence 43758 43239 -1.2% 1.01x (?)
MapReduceShort 49590 50125 +1.1% 0.99x (?)
MapReduceShortString 278 283 +1.8% 0.98x (?)
MapReduceString 2630 2603 -1.0% 1.01x (?)
Memset 44685 44656 -0.1% 1.00x (?)
MonteCarloE 928078 933157 +0.5% 0.99x (?)
MonteCarloPi 4136615 4171852 +0.9% 0.99x (?)
NSDictionaryCastToSwift 6385 6165 -3.4% 1.04x (?)
NSError 705 728 +3.3% 0.97x (?)
NSStringConversion 384 382 -0.5% 1.01x (?)
NopDeinit 171255 169927 -0.8% 1.01x (?)
ObjectAllocation 1406 1409 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSArrayAnyObject 23837 23547 -1.2% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6921 6806 -1.7% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 40270 40768 +1.2% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 35892 35645 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 119821 122558 +2.3% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7888 7736 -1.9% 1.02x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 95527 94919 -0.6% 1.01x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 100586 99677 -0.9% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 66707 67701 +1.5% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7523 7338 -2.5% 1.03x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 71025 72444 +2.0% 0.98x (?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 74735 73571 -1.6% 1.02x (?)
ObjectiveCBridgeFromNSString 3670 3677 +0.2% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2296 2314 +0.8% 0.99x
ObjectiveCBridgeStubDataAppend 4653 4520 -2.9% 1.03x (?)
ObjectiveCBridgeStubDateAccess 1242 1234 -0.6% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 25714 25915 +0.8% 0.99x (?)
ObjectiveCBridgeStubFromNSDate 4152 4231 +1.9% 0.98x
ObjectiveCBridgeStubFromNSDateRef 4653 4699 +1.0% 0.99x (?)
ObjectiveCBridgeStubFromNSString 598 586 -2.0% 1.02x (?)
ObjectiveCBridgeStubFromNSStringRef 195 187 -4.1% 1.04x
ObjectiveCBridgeStubNSDataAppend 2976 2996 +0.7% 0.99x (?)
ObjectiveCBridgeStubNSDateMutationRef 15071 15335 +1.8% 0.98x (?)
ObjectiveCBridgeStubNSDateRefAccess 1441 1420 -1.5% 1.01x (?)
ObjectiveCBridgeStubToArrayOfNSString 29299 29728 +1.5% 0.99x
ObjectiveCBridgeStubToNSDate 14882 14667 -1.4% 1.01x (?)
ObjectiveCBridgeStubToNSDateRef 3447 3436 -0.3% 1.00x (?)
ObjectiveCBridgeStubToNSString 1521 1476 -3.0% 1.03x
ObjectiveCBridgeStubToNSStringRef 162 157 -3.1% 1.03x (?)
ObjectiveCBridgeStubURLAppendPath 214382 220451 +2.8% 0.97x (?)
ObjectiveCBridgeStubURLAppendPathRef 221059 220540 -0.2% 1.00x (?)
ObjectiveCBridgeToNSArray 29255 28893 -1.2% 1.01x (?)
ObjectiveCBridgeToNSDictionary 46362 45319 -2.2% 1.02x (?)
ObjectiveCBridgeToNSSet 40391 40559 +0.4% 1.00x (?)
ObjectiveCBridgeToNSString 1291 1286 -0.4% 1.00x (?)
ObserverClosure 6745 6712 -0.5% 1.00x (?)
ObserverForwarderStruct 4820 4848 +0.6% 0.99x (?)
ObserverPartiallyAppliedMethod 8142 8151 +0.1% 1.00x (?)
ObserverUnappliedMethod 8586 8517 -0.8% 1.01x (?)
Phonebook 24719 24142 -2.3% 1.02x (?)
PolymorphicCalls 5208 5213 +0.1% 1.00x (?)
PopFrontArray 10278 9945 -3.2% 1.03x (?)
PopFrontArrayGeneric 8976 8937 -0.4% 1.00x (?)
PopFrontUnsafePointer 7629 7658 +0.4% 1.00x (?)
PrefixAnyCollection 20478 20371 -0.5% 1.01x (?)
PrefixAnyCollectionLazy 138088 135298 -2.0% 1.02x (?)
PrefixAnySeqCRangeIter 24040 23126 -3.8% 1.04x
PrefixAnySeqCRangeIterLazy 24058 23753 -1.3% 1.01x
PrefixAnySeqCntRange 20486 19834 -3.2% 1.03x (?)
PrefixAnySeqCntRangeLazy 20082 20260 +0.9% 0.99x (?)
PrefixAnySequence 11886 11851 -0.3% 1.00x (?)
PrefixAnySequenceLazy 11960 11798 -1.4% 1.01x
PrefixArray 5975 5944 -0.5% 1.01x (?)
PrefixArrayLazy 44307 43400 -2.0% 1.02x (?)
PrefixCountableRange 471 472 +0.2% 1.00x (?)
PrefixCountableRangeLazy 40924 40653 -0.7% 1.01x (?)
PrefixSequence 10863 10755 -1.0% 1.01x (?)
PrefixSequenceLazy 10866 10614 -2.3% 1.02x
PrefixWhileAnyCollection 37797 37477 -0.8% 1.01x (?)
PrefixWhileAnyCollectionLazy 23590 23203 -1.6% 1.02x (?)
PrefixWhileAnySeqCRangeIter 41435 41049 -0.9% 1.01x (?)
PrefixWhileAnySeqCRangeIterLazy 23078 23182 +0.5% 1.00x (?)
PrefixWhileAnySeqCntRange 38660 38511 -0.4% 1.00x (?)
PrefixWhileAnySeqCntRangeLazy 23520 23070 -1.9% 1.02x (?)
PrefixWhileAnySequence 31387 30908 -1.5% 1.02x (?)
PrefixWhileAnySequenceLazy 12374 12212 -1.3% 1.01x
PrefixWhileArray 16899 16800 -0.6% 1.01x
PrefixWhileArrayLazy 14838 15048 +1.4% 0.99x (?)
PrefixWhileCountableRange 18801 18379 -2.2% 1.02x (?)
PrefixWhileCountableRangeLazy 23012 22246 -3.3% 1.03x
PrefixWhileSequence 30167 30004 -0.5% 1.01x (?)
PrefixWhileSequenceLazy 11545 11371 -1.5% 1.02x
Prims 10087 9975 -1.1% 1.01x (?)
PrimsSplit 10033 9928 -1.0% 1.01x (?)
ProtocolDispatch 7600 7871 +3.6% 0.97x
ProtocolDispatch2 512 510 -0.4% 1.00x (?)
RC4 18578 18266 -1.7% 1.02x (?)
RGBHistogram 31519 31755 +0.7% 0.99x (?)
RGBHistogramOfObjects 98556 98851 +0.3% 1.00x (?)
RangeAssignment 5542 5551 +0.2% 1.00x (?)
RangeIterationSigned 17596 17220 -2.1% 1.02x (?)
RangeIterationSigned64 51697 51823 +0.2% 1.00x (?)
RangeIterationUnsigned 47340 47746 +0.9% 0.99x (?)
RecursiveOwnedParameter 10477 10507 +0.3% 1.00x (?)
ReversedArray 42802 42521 -0.7% 1.01x (?)
ReversedBidirectional 73061 74551 +2.0% 0.98x (?)
ReversedDictionary 28040 27945 -0.3% 1.00x (?)
SetExclusiveOr 18150 18511 +2.0% 0.98x (?)
SetExclusiveOr_OfObjects 45416 45559 +0.3% 1.00x (?)
SetIntersect 7965 8041 +1.0% 0.99x (?)
SetIntersect_OfObjects 11093 11125 +0.3% 1.00x (?)
SetIsSubsetOf 1327 1338 +0.8% 0.99x (?)
SetIsSubsetOf_OfObjects 1426 1401 -1.8% 1.02x
SetUnion 11631 11569 -0.5% 1.01x (?)
SetUnion_OfObjects 32661 31996 -2.0% 1.02x (?)
Sim2DArray 42673 42678 +0.0% 1.00x (?)
SortLargeExistentials 17050 17159 +0.6% 0.99x (?)
SortLettersInPlace 3022 2960 -2.1% 1.02x
SortSortedStrings 1420 1420 +0.0% 1.00x
SortStrings 2637 2554 -3.1% 1.03x
SortStringsUnicode 9200 9212 +0.1% 1.00x (?)
StackPromo 99007 96317 -2.7% 1.03x (?)
StaticArray 4560 4513 -1.0% 1.01x (?)
StrComplexWalk 7033 6957 -1.1% 1.01x (?)
StrToInt 99039 99228 +0.2% 1.00x (?)
StringAdder 3666 3667 +0.0% 1.00x (?)
StringBuilder 6874 6843 -0.5% 1.00x (?)
StringBuilderLong 1100 1067 -3.0% 1.03x (?)
StringEdits 374454 373492 -0.3% 1.00x (?)
StringEnumRawValueInitialization 12148 12151 +0.0% 1.00x (?)
StringFromLongWholeSubstring 205 206 +0.5% 1.00x (?)
StringFromLongWholeSubstringGeneric 214 213 -0.5% 1.00x (?)
StringHasPrefix 1912 1910 -0.1% 1.00x (?)
StringHasPrefixUnicode 17599 16840 -4.3% 1.05x
StringHasSuffix 2046 2001 -2.2% 1.02x (?)
StringHasSuffixUnicode 63921 64287 +0.6% 0.99x (?)
StringInterpolation 13435 13405 -0.2% 1.00x (?)
StringMatch 34706 34190 -1.5% 1.02x (?)
StringUTF16Builder 7691 7724 +0.4% 1.00x (?)
StringWalk 12194 11675 -4.3% 1.04x
StringWithCString 56892 56981 +0.2% 1.00x (?)
SubstringComparable 4107 4114 +0.2% 1.00x (?)
SubstringEqualString 6428 6465 +0.6% 0.99x (?)
SubstringEquatable 8544 8146 -4.7% 1.05x (?)
SubstringFromLongString 16 16 +0.0% 1.00x
SubstringFromLongStringGeneric 112 113 +0.9% 0.99x (?)
SuffixAnyCollection 6756 6518 -3.5% 1.04x (?)
SuffixAnyCollectionLazy 45976 45007 -2.1% 1.02x (?)
SuffixAnySeqCRangeIter 43074 42570 -1.2% 1.01x (?)
SuffixAnySeqCRangeIterLazy 43179 43909 +1.7% 0.98x (?)
SuffixAnySeqCntRange 6796 6684 -1.6% 1.02x (?)
SuffixAnySeqCntRangeLazy 6709 6761 +0.8% 0.99x (?)
SuffixAnySequence 29500 29412 -0.3% 1.00x (?)
SuffixAnySequenceLazy 29563 29210 -1.2% 1.01x (?)
SuffixArray 1995 1989 -0.3% 1.00x (?)
SuffixArrayLazy 14850 14878 +0.2% 1.00x (?)
SuffixCountableRange 163 163 +0.0% 1.00x
SuffixCountableRangeLazy 13627 13572 -0.4% 1.00x (?)
SuffixSequenceLazy 29200 28435 -2.6% 1.03x (?)
SumUsingReduce 219858 218329 -0.7% 1.01x (?)
SumUsingReduceInto 214699 219108 +2.1% 0.98x (?)
SuperChars 186356 185782 -0.3% 1.00x (?)
TwoSum 3868 3766 -2.6% 1.03x (?)
TypeFlood 158 164 +3.8% 0.96x (?)
UTF8Decode 35882 36013 +0.4% 1.00x (?)
Walsh 11796 12144 +3.0% 0.97x (?)
XorLoop 23285 23282 -0.0% 1.00x (?)
Added (4)
TEST MIN MAX MEAN MAX_RSS
DictionarySubscriptDefaultMutation 2146 2218 2178 10472653
DictionarySubscriptDefaultMutationArray 2554 2690 2627 10783130
DictionarySubscriptDefaultMutationArrayOfObjects 9494 9838 9645 11575296
DictionarySubscriptDefaultMutationOfObjects 6130 6911 6362 10470195
Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini7,1
  Processor Name: Intel Core i7
  Processor Speed: 3 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 16 GB

@slavapestov

This comment has been minimized.

Copy link
Member

slavapestov commented Nov 5, 2017

Some nice performance gains here!

@hamishknight hamishknight force-pushed the hamishknight:dictionary-subscript-addressor branch to 76ea3a2 Nov 19, 2017

@hamishknight

This comment has been minimized.

Copy link
Contributor Author

hamishknight commented Nov 19, 2017

Just fixed the uniqueness check in nativePointerToValue(forKey:insertingDefault:) in accordance with #13000.

Would it be best to rebase the commits into 1, or leave them as-is?

Also, any chance of getting this moving soon? :)

stdlib/public/core/HashedCollections.swift.gyb Outdated
@@ -2048,7 +2048,7 @@ public struct Dictionary<Key : Hashable, Value> :
}
mutableAddressWithNativeOwner {
let (_, address) = _variantBuffer
.pointerToValue(forKey: key, insertingDefault: defaultValue)
.pointerToValue(forKey: key, insertingDefault: defaultValue())

This comment has been minimized.

@natecook1000

natecook1000 Nov 21, 2017

Member

Could we remove the @autoclosure attribute from the _VariantDictionaryBuffer methods instead? Without being able to see the signature for pointerToValue it really looks like defaultValue is getting called here.

This comment has been minimized.

@hamishknight

hamishknight Nov 21, 2017

Author Contributor

I didn't have any strong opinion on it at the time; but now you mention it, yup, I agree.

[stdlib] Don't use autoclosure on pointerToValue(forKey:insertingDefa…
…ult:) methods

Previously we used @autoclosure on the _VariantDictionaryBuffer methods and forwarded closures directly.
However, this relied on an unintentional type-checker inconsistency, tracked by SR-5719.

@hamishknight hamishknight force-pushed the hamishknight:dictionary-subscript-addressor branch to 12416f9 Nov 21, 2017

@hamishknight

This comment has been minimized.

Copy link
Contributor Author

hamishknight commented Nov 28, 2017

Any news on this @moiseev?

@moiseev

This comment has been minimized.

Copy link
Member

moiseev commented Nov 28, 2017

Oops. Sorry did not pay attention.
@lorentey, you've been working with dictionaries recently. Mind taking a look?
/cc @airspeedswift

@airspeedswift

This comment has been minimized.

Copy link
Member

airspeedswift commented Dec 2, 2017

The trouble is we don't have the law of exclusivity, at least not for all code, it's still opt-in. So if a user has it turned off we need to be very careful about exactly what the situation is in that case. If it's just odd but safe behaviors in case of situations that area already considered invalid that might be ok, unsafe/undefined behavior would not. cc @atrick / @rjmccall

@hamishknight

This comment has been minimized.

Copy link
Contributor Author

hamishknight commented Dec 2, 2017

@airspeedswift This should fall under "odd but safe behavior" – the only difference to a user running code without exclusivity checks should be that during the window of mutation of a dictionary through subscript(_:default:), they'll potentially be able to see the default value already inserted (whereas before; they would only see the value inserted afterwards). I don't know whether anyone is actually relying on the previous behaviour though.

Do we actually guarantee specified behaviour for breaking the law of exclusivity though? From what I could tell, the stance towards that was it mustn't introduce undefined behaviour, but the user should expect their program to be difficult to reason about (is this correct?). IMO, this change fits well with that.

Although aren't exclusivity checks currently opt-out? -enforce-exclusivity=checked seems to be the default for swiftc.

@rjmccall

This comment has been minimized.

Copy link
Member

rjmccall commented Dec 2, 2017

Because we do not yet have guaranteed exclusivity, you need to use an owning addressor in order to ensure that nobody destroys or structurally modifies the buffer during the subscript access. But since you are using an owning addressor, I think this should be fine.

//
// SR-6437
let capacity = asNative.capacity
_ = ensureUniqueNativeBuffer(capacity)

This comment has been minimized.

@lorentey

lorentey Dec 3, 2017

Member

Shouldn't we just call _nativePointerToValue(at:) here?

This comment has been minimized.

@hamishknight

hamishknight Dec 3, 2017

Author Contributor

Thanks @lorentey, I've gone ahead and made that change.

@@ -25,6 +25,31 @@ func equalsUnordered<T : Comparable>(_ lhs: [T], _ rhs: [T]) -> Bool {
return lhs.sorted().elementsEqual(rhs.sorted())
}

// A COW wrapper type that holds an Int.

This comment has been minimized.

@lorentey

lorentey Dec 3, 2017

Member

It's perfectly fine to add this here!

@lorentey

This comment has been minimized.

Copy link
Member

lorentey commented Dec 3, 2017

@swift-ci Please test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Dec 3, 2017

Build failed
Swift Test Linux Platform
Git Sha - 76ea3a2

@apple apple deleted a comment from swift-ci Dec 3, 2017

@lorentey

This comment has been minimized.

Copy link
Member

lorentey commented Dec 4, 2017

@swift-ci Please test

@apple apple deleted a comment from swift-ci Dec 4, 2017

@apple apple deleted a comment from swift-ci Dec 4, 2017

@lorentey lorentey merged commit 9fef06e into apple:master Dec 4, 2017

4 checks passed

Swift Test Linux Platform 10601 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 53125 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@hamishknight hamishknight deleted the hamishknight:dictionary-subscript-addressor branch Dec 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment