Skip to content
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] De-gyb internal sort functions #6638

Closed
wants to merge 4 commits into from

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Jan 7, 2017

This de-gybs the internal sort functions and converts them to extension methods on MutableCollection—conversion to extension methods can come in a separate change.

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test OS X platform

@natecook1000
Copy link
Member Author

@swift-ci Please test OS X platform

@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2017

Build comment file:

Optimized (O)

Regression (3)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
Phonebook 7483 9485 +26.8% 0.79x
StrToInt 4969 5433 +9.3% 0.91x
CaptureProp 4105 4362 +6.3% 0.94x
Improvement (4)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
OpenClose 51 48 -5.9% 1.06x
ObjectiveCBridgeStubDateAccess 212 182 -14.2% 1.16x
StringHasSuffix 831 689 -17.1% 1.21x
StringHasPrefix 754 609 -19.2% 1.24x
No Changes (148)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
PolymorphicCalls 22 21 -4.5% 1.05x
ObjectiveCBridgeStubFromNSStringRef 130 125 -3.9% 1.04x
StringHasPrefixUnicode 13928 13343 -4.2% 1.04x(?)
DictionaryRemove 2379 2340 -1.6% 1.02x(?)
ObjectiveCBridgeStubFromNSDateRef 4078 4016 -1.5% 1.02x
ObjectiveCBridgeStubFromNSDate 3976 3913 -1.6% 1.02x(?)
ArraySubscript 1457 1447 -0.7% 1.01x(?)
StackPromo 21497 21289 -1.0% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 174822 173199 -0.9% 1.01x(?)
DictionarySwapOfObjects 6333 6274 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6323 6231 -1.5% 1.01x(?)
ReversedDictionary 95 94 -1.1% 1.01x(?)
PopFrontArray 1134 1120 -1.2% 1.01x(?)
ObjectiveCBridgeStubToNSDate 13547 13360 -1.4% 1.01x(?)
StringInterpolation 11036 10920 -1.1% 1.01x(?)
AnyHashableWithAClass 65349 64923 -0.7% 1.01x(?)
Join 476 469 -1.5% 1.01x
ObjectAllocation 155 153 -1.3% 1.01x(?)
ProtocolDispatch2 159 158 -0.6% 1.01x
Dictionary2 2029 2014 -0.7% 1.01x(?)
ObserverUnappliedMethod 2374 2360 -0.6% 1.01x(?)
ObjectiveCBridgeToNSSet 38200 37696 -1.3% 1.01x(?)
PopFrontArrayGeneric 1121 1113 -0.7% 1.01x(?)
UTF8Decode 289 287 -0.7% 1.01x
SortStringsUnicode 7299 7234 -0.9% 1.01x(?)
154 2902238 2873531 -1.0% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 107787 106727 -1.0% 1.01x(?)
NopDeinit 22810 22567 -1.1% 1.01x(?)
ObjectiveCBridgeToNSDictionary 60539 59839 -1.2% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 81798 81140 -0.8% 1.01x(?)
RGBHistogram 2298 2281 -0.7% 1.01x(?)
ObjectiveCBridgeStubNSDateMutationRef 11856 11686 -1.4% 1.01x(?)
TwoSum 1323 1305 -1.4% 1.01x(?)
ObserverPartiallyAppliedMethod 3413 3375 -1.1% 1.01x(?)
ObjectiveCBridgeToNSString 1070 1074 +0.4% 1.00x(?)
MonteCarloPi 45018 45012 -0.0% 1.00x(?)
RecursiveOwnedParameter 1933 1933 +0.0% 1.00x
ObjectiveCBridgeStubToNSString 1282 1283 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 96046 96214 +0.2% 1.00x(?)
ClassArrayGetter 12 12 +0.0% 1.00x
Array2D 2051 2048 -0.1% 1.00x(?)
SortStrings 1687 1685 -0.1% 1.00x(?)
DictionaryBridge 3417 3402 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5471 5482 +0.2% 1.00x(?)
ReversedArray 49 49 +0.0% 1.00x
StringWithCString 155153 155472 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2679 2670 -0.3% 1.00x(?)
Prims 730 729 -0.1% 1.00x(?)
SortLettersInPlace 1033 1036 +0.3% 1.00x(?)
DictionarySwap 412 414 +0.5% 1.00x
ArrayAppendToFromGeneric 1074 1073 -0.1% 1.00x(?)
Dictionary3OfObjects 868 868 +0.0% 1.00x
RangeAssignment 280 280 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
ArrayAppendGenericStructs 1232 1236 +0.3% 1.00x(?)
SuperChars 211021 211766 +0.3% 1.00x(?)
ArrayAppendLazyMap 841 842 +0.1% 1.00x(?)
XorLoop 380 380 +0.0% 1.00x
ArrayAppendReserved 537 537 +0.0% 1.00x
ObserverClosure 1985 1979 -0.3% 1.00x(?)
Integrate 238 238 +0.0% 1.00x
ArrayAppendStrings 12112 12092 -0.2% 1.00x(?)
ProtocolDispatch 3039 3039 +0.0% 1.00x
TypeFlood 0 0 +0.0% 1.00x
SortSortedStrings 869 868 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObject 80741 80664 -0.1% 1.00x(?)
AngryPhonebook 2819 2830 +0.4% 1.00x(?)
ArrayPlusEqualArrayOfInt 599 599 +0.0% 1.00x
Dictionary3 521 522 +0.2% 1.00x(?)
SetIntersect_OfObjects 1492 1492 +0.0% 1.00x
ErrorHandling 2956 2962 +0.2% 1.00x(?)
ArrayOfRef 3523 3510 -0.4% 1.00x(?)
DictionaryOfObjects 2282 2286 +0.2% 1.00x(?)
StringEqualPointerComparison 7299 7303 +0.1% 1.00x(?)
RC4 165 165 +0.0% 1.00x
ObjectiveCBridgeStubToNSStringRef 116 116 +0.0% 1.00x
ArrayAppendFromGeneric 1074 1074 +0.0% 1.00x
MapReduce 342 342 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 273 273 +0.0% 1.00x
IterateData 2512 2515 +0.1% 1.00x(?)
ArrayOfGenericPOD 220 220 +0.0% 1.00x
DictionaryRemoveOfObjects 19490 19487 -0.0% 1.00x(?)
ObjectiveCBridgeStubURLAppendPath 231955 233017 +0.5% 1.00x(?)
SetIsSubsetOf 250 250 +0.0% 1.00x
ObjectiveCBridgeStubToArrayOfNSString 29902 29836 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 73975 74145 +0.2% 1.00x(?)
SetIntersect 366 367 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 116530 115969 -0.5% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 308 308 +0.0% 1.00x
ArrayOfGenericRef 3656 3639 -0.5% 1.00x(?)
Sim2DArray 277 277 +0.0% 1.00x
ArrayAppendRepeatCol 643 643 +0.0% 1.00x
MonteCarloE 10531 10495 -0.3% 1.00x(?)
SetUnion_OfObjects 6272 6301 +0.5% 1.00x(?)
ArrayAppendToGeneric 1073 1074 +0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 307 306 -0.3% 1.00x(?)
ArrayAppend 774 776 +0.3% 1.00x(?)
LinkedList 7242 7212 -0.4% 1.00x(?)
ReversedBidirectional 44979 45100 +0.3% 1.00x(?)
RGBHistogramOfObjects 21346 21438 +0.4% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4721 4731 +0.2% 1.00x(?)
ArrayAppendSequence 1061 1061 +0.0% 1.00x
ArrayAppendArrayOfInt 599 599 +0.0% 1.00x
ArrayOfPOD 182 182 +0.0% 1.00x
ObserverForwarderStruct 928 927 -0.1% 1.00x(?)
DeadArray 182 182 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2394 2403 +0.4% 1.00x(?)
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 1175 1173 -0.2% 1.00x(?)
SevenBoom 1363 1366 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 88555 88390 -0.2% 1.00x(?)
ArrayValueProp 6 6 +0.0% 1.00x
GlobalClass 0 0 +0.0% 1.00x
Memset 235 235 +0.0% 1.00x
Dictionary2OfObjects 3422 3428 +0.2% 1.00x(?)
ArrayValueProp4 6 6 +0.0% 1.00x
ArrayValueProp2 6 6 +0.0% 1.00x
ArrayValueProp3 6 6 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObject 164070 165166 +0.7% 0.99x(?)
ObjectiveCBridgeStubFromNSString 762 772 +1.3% 0.99x(?)
HashTest 1723 1740 +1.0% 0.99x(?)
StrComplexWalk 2889 2911 +0.8% 0.99x(?)
ArrayAppendOptionals 1226 1235 +0.7% 0.99x(?)
ObjectiveCBridgeToNSArray 30428 30715 +0.9% 0.99x(?)
NSError 324 326 +0.6% 0.99x(?)
ObjectiveCBridgeStubToNSDateRef 3263 3301 +1.2% 0.99x(?)
PopFrontUnsafePointer 9033 9112 +0.9% 0.99x(?)
DictionaryLiteral 1263 1272 +0.7% 0.99x(?)
Dictionary 726 732 +0.8% 0.99x(?)
ObjectiveCBridgeStubDataAppend 3432 3451 +0.6% 0.99x(?)
SetExclusiveOr 2547 2573 +1.0% 0.99x(?)
NSDictionaryCastToSwift 4977 5028 +1.0% 0.99x(?)
StringBuilder 1320 1334 +1.1% 0.99x(?)
SetExclusiveOr_OfObjects 7454 7495 +0.6% 0.99x(?)
StringHasSuffixUnicode 62602 63315 +1.1% 0.99x(?)
Walsh 310 313 +1.0% 0.99x
SetUnion 2407 2431 +1.0% 0.99x(?)
Chars 632 638 +0.9% 0.99x(?)
StringWalk 5869 5901 +0.6% 0.99x(?)
ObjectiveCBridgeStubFromArrayOfNSString 56929 57333 +0.7% 0.99x(?)
Histogram 285 291 +2.1% 0.98x(?)
ObjectiveCBridgeStubURLAppendPathRef 227263 231036 +1.7% 0.98x(?)
ArrayInClass 62 63 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSString 1785 1826 +2.3% 0.98x
StaticArray 131 137 +4.6% 0.96x(?)
Hanoi 3367 3519 +4.5% 0.96x
Calculator 35 37 +5.7% 0.95x
NSStringConversion 795 834 +4.9% 0.95x
**Unoptimized (Onone)**
Regression (5)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ProtocolDispatch 5759 6403 +11.2% 0.90x
PopFrontUnsafePointer 162706 180379 +10.9% 0.90x
StringHasPrefix 1577 1720 +9.1% 0.92x
ReversedArray 517 554 +7.2% 0.93x
BitCount 96 103 +7.3% 0.93x
Improvement (3)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
StringHasSuffix 1724 1628 -5.6% 1.06x
ObjectiveCBridgeStubDateMutation 487 456 -6.4% 1.07x
OpenClose 429 393 -8.4% 1.09x
No Changes (147)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
NopDeinit 49068 46522 -5.2% 1.05x
Calculator 997 957 -4.0% 1.04x
ArrayAppendGenericStructs 1328 1293 -2.6% 1.03x(?)
TypeFlood 186 181 -2.7% 1.03x(?)
StringEqualPointerComparison 9836 9575 -2.6% 1.03x
ObjectiveCBridgeStubDateAccess 1126 1095 -2.8% 1.03x
ArrayOfPOD 1900 1839 -3.2% 1.03x
ObjectiveCBridgeStubNSDateRefAccess 1260 1220 -3.2% 1.03x
StringWalk 22387 21635 -3.4% 1.03x
ObjectiveCBridgeStubFromNSDate 3930 3805 -3.2% 1.03x
StackPromo 130695 127663 -2.3% 1.02x(?)
ObjectiveCBridgeStubFromNSStringRef 162 159 -1.9% 1.02x
ObjectiveCBridgeStubURLAppendPathRef 238120 234000 -1.7% 1.02x(?)
ArrayAppendOptionals 1318 1297 -1.6% 1.02x(?)
Histogram 9954 9889 -0.7% 1.01x(?)
SortStrings 2495 2474 -0.8% 1.01x
DictionaryBridge 3531 3500 -0.9% 1.01x(?)
ObjectiveCBridgeFromNSStringForced 3134 3105 -0.9% 1.01x
SortLettersInPlace 2677 2655 -0.8% 1.01x
ObjectiveCBridgeFromNSSetAnyObject 86629 85773 -1.0% 1.01x(?)
AnyHashableWithAClass 80317 79910 -0.5% 1.01x
ProtocolDispatch2 444 441 -0.7% 1.01x
Dictionary3 1385 1374 -0.8% 1.01x(?)
ObjectiveCBridgeToNSSet 38556 38116 -1.1% 1.01x(?)
ObjectiveCBridgeToNSArray 30855 30600 -0.8% 1.01x(?)
DictionaryOfObjects 4620 4597 -0.5% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 113580 112871 -0.6% 1.01x(?)
Dictionary 1866 1846 -1.1% 1.01x
ObjectiveCBridgeStubDataAppend 3549 3512 -1.0% 1.01x(?)
ObjectiveCBridgeToNSDictionary 62074 61401 -1.1% 1.01x(?)
DictionaryRemove 17959 17865 -0.5% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 125926 125171 -0.6% 1.01x(?)
ArrayLiteral 1251 1241 -0.8% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7536 7455 -1.1% 1.01x(?)
TwoSum 4835 4798 -0.8% 1.01x(?)
ArraySubscript 5673 5652 -0.4% 1.00x(?)
DictionarySwapOfObjects 20021 19964 -0.3% 1.00x(?)
RecursiveOwnedParameter 10954 10929 -0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1335 1333 -0.1% 1.00x(?)
ClassArrayGetter 1278 1278 +0.0% 1.00x
Array2D 816066 816073 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 8057 8077 +0.2% 1.00x(?)
MonteCarloPi 53547 53723 +0.3% 1.00x
StringWithCString 152828 153499 +0.4% 1.00x(?)
Prims 12779 12721 -0.5% 1.00x(?)
DictionarySwap 6129 6102 -0.4% 1.00x
ReversedDictionary 32982 32926 -0.2% 1.00x
ArrayAppendToFromGeneric 225657 225199 -0.2% 1.00x(?)
RangeAssignment 7180 7191 +0.1% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
SuperChars 266418 265466 -0.4% 1.00x(?)
ArrayAppendLazyMap 260196 260417 +0.1% 1.00x(?)
XorLoop 19994 19993 -0.0% 1.00x(?)
ObserverClosure 7075 7090 +0.2% 1.00x(?)
Integrate 366 366 +0.0% 1.00x
ArrayAppendStrings 11781 11798 +0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSString 797 795 -0.2% 1.00x(?)
StaticArray 3724 3709 -0.4% 1.00x(?)
ObjectAllocation 556 556 +0.0% 1.00x
SortSortedStrings 1254 1257 +0.2% 1.00x(?)
Walsh 13206 13219 +0.1% 1.00x(?)
Dictionary2 3671 3660 -0.3% 1.00x(?)
SetIntersect_OfObjects 11929 11960 +0.3% 1.00x(?)
ErrorHandling 3802 3792 -0.3% 1.00x(?)
ObserverUnappliedMethod 8802 8798 -0.1% 1.00x(?)
ArrayPlusEqualArrayOfInt 644 643 -0.2% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3331 3318 -0.4% 1.00x(?)
PopFrontArrayGeneric 9552 9574 +0.2% 1.00x
PolymorphicCalls 1144 1148 +0.3% 1.00x
RC4 9385 9388 +0.0% 1.00x(?)
ObjectiveCBridgeStubToNSStringRef 155 155 +0.0% 1.00x
ArrayAppendFromGeneric 225762 225135 -0.3% 1.00x(?)
MapReduce 44827 44896 +0.1% 1.00x(?)
IterateData 10066 10098 +0.3% 1.00x(?)
DictionaryLiteral 15953 15919 -0.2% 1.00x(?)
Hanoi 19655 19747 +0.5% 1.00x
ArrayOfGenericPOD 3070 3078 +0.3% 1.00x(?)
DictionaryRemoveOfObjects 48083 48099 +0.0% 1.00x(?)
UTF8Decode 45682 45754 +0.2% 1.00x(?)
SortStringsUnicode 8311 8319 +0.1% 1.00x(?)
154 6423665 6438564 +0.2% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 76885 77243 +0.5% 1.00x(?)
SetIntersect 11142 11108 -0.3% 1.00x
SetExclusiveOr 20882 20891 +0.0% 1.00x(?)
NSDictionaryCastToSwift 6270 6247 -0.4% 1.00x(?)
RGBHistogramOfObjects 83017 83030 +0.0% 1.00x(?)
ArrayInClass 3957 3956 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSString 4578 4591 +0.3% 1.00x(?)
Sim2DArray 14776 14773 -0.0% 1.00x(?)
SetExclusiveOr_OfObjects 39574 39676 +0.3% 1.00x(?)
MonteCarloE 108492 108144 -0.3% 1.00x(?)
SetUnion_OfObjects 28272 28329 +0.2% 1.00x(?)
ReversedBidirectional 131696 131754 +0.0% 1.00x(?)
StringHasSuffixUnicode 64594 64376 -0.3% 1.00x
ArrayAppendToGeneric 225622 225069 -0.2% 1.00x
HashTest 5261 5260 -0.0% 1.00x(?)
SetIsSubsetOf_OfObjects 1903 1894 -0.5% 1.00x(?)
StringHasPrefixUnicode 15199 15263 +0.4% 1.00x
LinkedList 27612 27528 -0.3% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 88051 88173 +0.1% 1.00x(?)
RGBHistogram 34582 34563 -0.1% 1.00x(?)
ArrayAppendArrayOfInt 642 641 -0.2% 1.00x(?)
SetUnion 12002 11968 -0.3% 1.00x(?)
StringBuilder 2745 2732 -0.5% 1.00x(?)
ObserverForwarderStruct 5298 5302 +0.1% 1.00x(?)
DeadArray 120292 120504 +0.2% 1.00x(?)
ArrayValueProp2 3198 3197 -0.0% 1.00x(?)
AngryPhonebook 2980 2988 +0.3% 1.00x(?)
SevenBoom 1507 1508 +0.1% 1.00x(?)
ArrayValueProp4 3021 3024 +0.1% 1.00x(?)
ArrayValueProp 2672 2669 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromArrayOfNSString 57556 57412 -0.2% 1.00x(?)
ObjectiveCBridgeStubNSDateMutationRef 14251 14306 +0.4% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 20968 20961 -0.0% 1.00x(?)
Dictionary2OfObjects 5985 5984 -0.0% 1.00x(?)
ArrayValueProp3 3060 3063 +0.1% 1.00x(?)
ObserverPartiallyAppliedMethod 8498 8513 +0.2% 1.00x(?)
ObjectiveCBridgeToNSString 1101 1107 +0.5% 0.99x
ObjectiveCBridgeFromNSDictionaryAnyObject 171976 174450 +1.4% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 97511 98517 +1.0% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 10393 10448 +0.5% 0.99x(?)
PopFrontArray 13650 13754 +0.8% 0.99x(?)
Dictionary3OfObjects 2130 2141 +0.5% 0.99x(?)
Join 1478 1489 +0.7% 0.99x
ArrayOfRef 8945 9008 +0.7% 0.99x
CaptureProp 99544 100270 +0.7% 0.99x(?)
ObjectiveCBridgeStubURLAppendPath 235712 236949 +0.5% 0.99x(?)
SetIsSubsetOf 1955 1968 +0.7% 0.99x(?)
ObjectiveCBridgeStubToArrayOfNSString 29799 30173 +1.3% 0.99x(?)
StrToInt 5747 5804 +1.0% 0.99x(?)
ArrayOfGenericRef 9962 10080 +1.2% 0.99x(?)
ArrayAppendRepeatCol 210472 213484 +1.4% 0.99x
ArrayAppendSequence 101306 101872 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 89844 90900 +1.2% 0.99x(?)
ObjectiveCBridgeStubFromNSDateRef 4043 4110 +1.7% 0.98x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 180234 185968 +3.2% 0.97x(?)
ObjectiveCBridgeStubToNSDate 14044 14423 +2.7% 0.97x(?)
StrComplexWalk 7644 7860 +2.8% 0.97x
NSError 675 699 +3.6% 0.97x
ArrayAppend 3439 3555 +3.4% 0.97x
ObjectiveCBridgeStubNSDataAppend 2747 2823 +2.8% 0.97x(?)
StringInterpolation 15288 15880 +3.9% 0.96x(?)
Chars 6434 6728 +4.6% 0.96x
ArrayAppendReserved 3185 3302 +3.7% 0.96x
Phonebook 21379 22469 +5.1% 0.95x
NSStringConversion 1343 1411 +5.1% 0.95x
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i5 Processor Speed: 2.8 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 3 MB Memory: 16 GB

@natecook1000 natecook1000 requested a review from dabrahams January 7, 2017 19:24
@natecook1000 natecook1000 changed the title [wip] De-gyb internal sort functions [stdlib] De-gyb internal sort functions Jan 7, 2017
@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2017

!!! Couldn't read commit file !!!

@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Jan 7, 2017

!!! Couldn't read commit file !!!

@airspeedswift
Copy link
Member

Benchmarks look promising – question is, do we have enough of them I wonder.

@natecook1000
Copy link
Member Author

The Phonebook test worries me a bit, since that's a test of sorting a custom Comparable type. My testing with stdlib types using the current sort shows a funny discrepancy: in -Onone build, myInts.sort() is 3x slower than myInts.sort(by: <), while in a -O build, myInts.sort() is 2x faster than myInts.sort(by: <). This change erases the difference under -Onone, but I'm getting SIL errors under -O locally so I can't see what's happening under optimization.

@gottesmm
Copy link
Contributor

gottesmm commented Jan 8, 2017

@airspeedswift TBH, this may be a good opportunity to clean up our sorting benchmarks.

To my mind, these are the axis that we care about:

  1. Underlying Type: Trivial, Swift Ref Counted, ObjC Ref Counted
  2. Container Type: None, Generic, Existential
  3. Type of Comparator. Is it a default comparison, a closure, does it access underlying types.

My personal opinion is that for each "sortable" stdlib type, we should have a full suite of benchmarks like this.

@natecook1000
Copy link
Member Author

Hmmm. I simplified my benchmark so it would compile and I'm seeing a big slowdown (~11x) with just the de-gybbed code, even when passing a comparator closure, which shouldn't have changed at all.

Test: https://gist.github.com/natecook1000/601463d7353114b047da54dd34d8c9dd
With swift/master:

$ .../swiftc -O customComp.swift
$ time ./customComp
3
real	0m0.206s
user	0m0.186s
sys	0m0.015s
$ time ./customComp by
3
real	0m0.209s
user	0m0.192s
sys	0m0.012s

With de-gybbed version (8c4b543):

$ .../swiftc -O customComp.swift
$ time ./customComp
3
real	0m2.355s
user	0m2.308s
sys	0m0.023s
$ time ./customComp by
3
real	0m2.287s
user	0m2.266s
sys	0m0.015s

🤔

@natecook1000
Copy link
Member Author

@gottesmm That's a really good idea 👍

@airspeedswift
Copy link
Member

@gottesmm other dimensions: size of input (small input will only call insertion sort, skip the introsort part completely), and how already-sorted the input is.

Exhaustive combinations might be overkill given the number of possibilities (we don't want to start gybbing benchmarks 👹). Be good to start with a good range of some of the more common variations though.

@airspeedswift
Copy link
Member

rdar://30641545 is tracking the performance problems with this.

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Mar 7, 2017

Build comment file:

Build failed before running benchmark.


@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Mar 7, 2017

Build comment file:

Build failed before running benchmark.


@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Mar 7, 2017

Build comment file:

Build failed before running benchmark.


@natecook1000
Copy link
Member Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (5)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
StringHasPrefix 636 749 +17.8% 0.85x
Phonebook 7329 8544 +16.6% 0.86x
Calculator 31 35 +12.9% 0.89x
StringHasSuffix 749 819 +9.3% 0.91x
NopDeinit 21360 22875 +7.1% 0.93x
Improvement (6)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubFromNSDateRef 3821 3612 -5.5% 1.06x(?)
PopFrontUnsafePointer 9783 9134 -6.6% 1.07x(?)
OpenClose 57 53 -7.0% 1.08x
PopFrontArray 1227 1121 -8.6% 1.09x(?)
MapReduceAnyCollection 333 303 -9.0% 1.10x
ObjectiveCBridgeStubNSDateRefAccess 374 318 -15.0% 1.18x
No Changes (171)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubFromNSStringRef 180 172 -4.4% 1.05x
PolymorphicCalls 22 21 -4.5% 1.05x
MapReduce 330 316 -4.2% 1.04x
Chars 1525 1461 -4.2% 1.04x
ObjectiveCBridgeStubNSDataAppend 2302 2239 -2.7% 1.03x(?)
MapReduceLazyCollectionShort 45 44 -2.2% 1.02x
ObjectiveCBridgeStubURLAppendPathRef 211269 207064 -2.0% 1.02x(?)
ObjectiveCBridgeToNSSet 36557 35970 -1.6% 1.02x(?)
NSDictionaryCastToSwift 5361 5246 -2.1% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 71314 70074 -1.7% 1.02x(?)
NSStringConversion 735 721 -1.9% 1.02x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4215 4127 -2.1% 1.02x(?)
ObjectiveCBridgeStubNSDateMutationRef 12424 12238 -1.5% 1.02x(?)
ObjectiveCBridgeStubFromNSDate 3753 3682 -1.9% 1.02x
ArrayAppendLatin1 45087 44814 -0.6% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 140106 138975 -0.8% 1.01x(?)
Histogram 244 242 -0.8% 1.01x
ProtocolDispatch2 155 153 -1.3% 1.01x
AnyHashableWithAClass 68306 67442 -1.3% 1.01x(?)
ErrorHandling 3026 3004 -0.7% 1.01x(?)
AngryPhonebook 2921 2883 -1.3% 1.01x(?)
MapReduceSequence 559 556 -0.5% 1.01x(?)
DictionaryLiteral 1563 1553 -0.6% 1.01x(?)
SetExclusiveOr 2541 2507 -1.3% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 95758 95153 -0.6% 1.01x(?)
181 9795627 9719013 -0.8% 1.01x
ArrayAppendOptionals 1229 1218 -0.9% 1.01x(?)
SetExclusiveOr_OfObjects 7905 7853 -0.7% 1.01x(?)
SetUnion_OfObjects 6416 6356 -0.9% 1.01x(?)
ArraySubscript 1523 1522 -0.1% 1.00x(?)
ObjectiveCBridgeToNSString 1260 1263 +0.2% 1.00x(?)
DictionarySwapOfObjects 6902 6921 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 117301 117779 +0.4% 1.00x(?)
ObjectiveCBridgeStubToNSString 1514 1510 -0.3% 1.00x(?)
ClassArrayGetter 13 13 +0.0% 1.00x
DictionaryBridge 2962 2968 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4932 4944 +0.2% 1.00x(?)
ReversedArray 49 49 +0.0% 1.00x
MonteCarloPi 44985 44857 -0.3% 1.00x
StringWithCString 157447 157279 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4421 4426 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2329 2319 -0.4% 1.00x
Prims 760 758 -0.3% 1.00x(?)
SortLettersInPlace 1151 1150 -0.1% 1.00x(?)
DictionarySwap 371 371 +0.0% 1.00x
ArrayAppendToFromGeneric 596 596 +0.0% 1.00x
MapReduceString 73 73 +0.0% 1.00x
Dictionary3OfObjects 1066 1066 +0.0% 1.00x
StringUTF16Builder 2202 2202 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
ArrayAppendGenericStructs 1217 1219 +0.2% 1.00x(?)
SuperChars 252947 251788 -0.5% 1.00x(?)
ArrayAppendLazyMap 908 910 +0.2% 1.00x(?)
ArrayPlusEqualFiveElementCollection 52126 52107 -0.0% 1.00x(?)
XorLoop 353 353 +0.0% 1.00x
ArrayAppendReserved 532 533 +0.2% 1.00x(?)
ObserverClosure 2197 2196 -0.1% 1.00x(?)
CharacterLiteralsSmall 803 805 +0.2% 1.00x
ArrayPlusEqualSingleElementCollection 49853 49839 -0.0% 1.00x(?)
ArrayAppendStrings 13601 13641 +0.3% 1.00x(?)
ObjectiveCBridgeStubFromNSString 910 914 +0.4% 1.00x(?)
ProtocolDispatch 3031 3030 -0.0% 1.00x(?)
ObjectAllocation 179 179 +0.0% 1.00x
TypeFlood 0 0 +0.0% 1.00x
StringHasSuffixUnicode 61223 61112 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObject 64406 64509 +0.2% 1.00x(?)
Dictionary3 595 596 +0.2% 1.00x(?)
StrComplexWalk 2936 2928 -0.3% 1.00x(?)
SetIntersect_OfObjects 1723 1722 -0.1% 1.00x(?)
ArrayOfRef 3871 3869 -0.1% 1.00x(?)
ObserverUnappliedMethod 2693 2692 -0.0% 1.00x(?)
ObjectiveCBridgeStubDateMutation 272 272 +0.0% 1.00x
ObjectiveCBridgeToNSArray 27825 27923 +0.3% 1.00x(?)
NSError 346 347 +0.3% 1.00x(?)
DictionaryOfObjects 2572 2568 -0.2% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3394 3385 -0.3% 1.00x(?)
PopFrontArrayGeneric 1226 1224 -0.2% 1.00x(?)
CaptureProp 4602 4581 -0.5% 1.00x
MapReduceAnyCollectionShort 2162 2162 +0.0% 1.00x
ArrayAppendFromGeneric 596 596 +0.0% 1.00x
MapReduceShort 1951 1950 -0.1% 1.00x(?)
ArrayAppendUTF16 41738 41586 -0.4% 1.00x(?)
IterateData 2692 2681 -0.4% 1.00x(?)
Hanoi 3422 3432 +0.3% 1.00x(?)
ArrayOfGenericPOD 219 219 +0.0% 1.00x
DictionaryRemoveOfObjects 22320 22319 -0.0% 1.00x(?)
UTF8Decode 280 280 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 211023 211363 +0.2% 1.00x(?)
MapReduceLazySequence 90 90 +0.0% 1.00x
SetIsSubsetOf 292 292 +0.0% 1.00x
Dictionary 795 797 +0.2% 1.00x(?)
ObjectiveCBridgeStubToArrayOfNSString 27564 27575 +0.0% 1.00x(?)
CStringShortAscii 5153 5178 +0.5% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 23193 23113 -0.3% 1.00x(?)
ObjectiveCBridgeStubDataAppend 3677 3680 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 79998 79919 -0.1% 1.00x(?)
ArrayInClass 61 61 +0.0% 1.00x
ArrayOfGenericRef 3983 3976 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSString 1399 1400 +0.1% 1.00x(?)
Sim2DArray 276 276 +0.0% 1.00x
ArrayAppendRepeatCol 838 838 +0.0% 1.00x
MapReduceShortString 18 18 +0.0% 1.00x
ObjectiveCBridgeToNSDictionary 59995 59848 -0.2% 1.00x(?)
ArrayAppendAscii 19901 20000 +0.5% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
ArrayAppendToGeneric 596 596 +0.0% 1.00x
HashTest 1779 1784 +0.3% 1.00x(?)
SetIsSubsetOf_OfObjects 369 369 +0.0% 1.00x
HashQuadratic 6320019 6295321 -0.4% 1.00x(?)
ArrayAppend 774 775 +0.1% 1.00x(?)
StringHasPrefixUnicode 14118 14107 -0.1% 1.00x(?)
LinkedList 7186 7178 -0.1% 1.00x(?)
ReversedBidirectional 49840 50035 +0.4% 1.00x(?)
RGBHistogramOfObjects 24090 24093 +0.0% 1.00x(?)
MapReduceLazyCollection 15 15 +0.0% 1.00x
ArrayAppendSequence 977 977 +0.0% 1.00x
ArrayAppendArrayOfInt 596 596 +0.0% 1.00x
ArrayOfPOD 166 166 +0.0% 1.00x
RGBHistogram 2615 2608 -0.3% 1.00x(?)
StringBuilder 1357 1352 -0.4% 1.00x(?)
ObserverForwarderStruct 1084 1082 -0.2% 1.00x(?)
CStringLongNonAscii 2914 2914 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayLiteral 1220 1220 +0.0% 1.00x
ArrayPlusEqualArrayOfInt 596 596 +0.0% 1.00x
SevenBoom 1454 1455 +0.1% 1.00x(?)
StringWalk 6167 6182 +0.2% 1.00x(?)
ArrayValueProp 6 6 +0.0% 1.00x
Memset 234 234 +0.0% 1.00x
Dictionary2OfObjects 3661 3669 +0.2% 1.00x(?)
ArrayValueProp4 6 6 +0.0% 1.00x
TwoSum 1252 1248 -0.3% 1.00x(?)
ArrayValueProp2 6 6 +0.0% 1.00x
ArrayValueProp3 6 6 +0.0% 1.00x
ObserverPartiallyAppliedMethod 3705 3712 +0.2% 1.00x(?)
StackPromo 22816 22970 +0.7% 0.99x(?)
RecursiveOwnedParameter 2324 2341 +0.7% 0.99x
ObjectiveCBridgeFromNSArrayAnyObjectToString 42925 43408 +1.1% 0.99x(?)
Array2D 2040 2051 +0.5% 0.99x(?)
SortStrings 1665 1682 +1.0% 0.99x
ReversedDictionary 128 129 +0.8% 0.99x(?)
ObjectiveCBridgeStubToNSDate 14560 14727 +1.1% 0.99x(?)
StringInterpolation 9359 9415 +0.6% 0.99x(?)
StringEdits 517143 519902 +0.5% 0.99x(?)
CStringLongAscii 7998 8111 +1.4% 0.99x(?)
CharacterLiteralsLarge 12229 12366 +1.1% 0.99x(?)
Walsh 354 357 +0.8% 0.99x
Dictionary2 2126 2144 +0.8% 0.99x
Join 489 496 +1.4% 0.99x(?)
StringEqualPointerComparison 7274 7359 +1.2% 0.99x(?)
StringAdder 1629 1643 +0.9% 0.99x
ObjectiveCBridgeStubToNSStringRef 109 110 +0.9% 0.99x(?)
StringMatch 35757 36233 +1.3% 0.99x
SortStringsUnicode 7508 7564 +0.8% 0.99x
MapReduceClassShort 4523 4552 +0.6% 0.99x(?)
ObjectiveCBridgeStubDateAccess 181 182 +0.6% 0.99x
MonteCarloE 10535 10622 +0.8% 0.99x
DictionaryRemove 3104 3144 +1.3% 0.99x(?)
SetUnion 2142 2161 +0.9% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 71449 72215 +1.1% 0.99x(?)
ObjectiveCBridgeStubFromArrayOfNSString 52408 52840 +0.8% 0.99x(?)
RC4 156 158 +1.3% 0.99x
StringBuilderLong 941 956 +1.6% 0.98x(?)
Integrate 262 266 +1.5% 0.98x
SetIntersect 322 327 +1.6% 0.98x(?)
DeadArray 181 184 +1.7% 0.98x
MapReduceClass 3031 3088 +1.9% 0.98x
RangeAssignment 307 318 +3.6% 0.97x(?)
StaticArray 148 153 +3.4% 0.97x
SortSortedStrings 839 862 +2.7% 0.97x(?)
StrToInt 5631 5924 +5.2% 0.95x
**Unoptimized (Onone)**
Regression (4)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
OpenClose 414 513 +23.9% 0.81x
ObjectiveCBridgeStubDataAppend 3947 4352 +10.3% 0.91x(?)
Phonebook 21651 22913 +5.8% 0.94x
ArrayAppendReserved 3315 3531 +6.5% 0.94x
Improvement (1)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
Calculator 1039 979 -5.8% 1.06x
No Changes (177)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
MapReduceLazySequence 28190 27492 -2.5% 1.03x(?)
ObjectiveCBridgeStubToArrayOfNSString 29316 28453 -2.9% 1.03x(?)
StringHasSuffix 1553 1515 -2.5% 1.03x
ArrayAppendLatin1 103950 102033 -1.8% 1.02x
StackPromo 98642 96819 -1.9% 1.02x(?)
ArrayAppendUTF16 103527 101341 -2.1% 1.02x
ObjectiveCBridgeToNSDictionary 60586 59600 -1.6% 1.02x(?)
StringMatch 87374 86054 -1.5% 1.02x(?)
ArrayAppendOptionals 1308 1295 -1.0% 1.01x(?)
ArrayPlusEqualSingleElementCollection 268629 266796 -0.7% 1.01x(?)
ErrorHandling 4082 4039 -1.1% 1.01x
StaticArray 4584 4544 -0.9% 1.01x
SortSortedStrings 1400 1385 -1.1% 1.01x(?)
ObjectiveCBridgeStubURLAppendPathRef 221105 217917 -1.4% 1.01x(?)
ObjectiveCBridgeToNSSet 37152 36750 -1.1% 1.01x(?)
ObjectiveCBridgeStubToNSDateRef 3388 3361 -0.8% 1.01x(?)
MapReduceSequence 42045 41740 -0.7% 1.01x
NSDictionaryCastToSwift 6565 6499 -1.0% 1.01x(?)
ArrayAppendAscii 83761 82704 -1.3% 1.01x
ArrayAppend 3783 3759 -0.6% 1.01x
StringHasPrefixUnicode 15813 15628 -1.2% 1.01x
ArrayAppendSequence 71644 71165 -0.7% 1.01x
ObjectiveCBridgeStubFromArrayOfNSString 53489 53192 -0.6% 1.01x(?)
TwoSum 4732 4697 -0.7% 1.01x(?)
ObjectiveCBridgeStubDateAccess 1014 1003 -1.1% 1.01x
ArraySubscript 4171 4186 +0.4% 1.00x(?)
ObjectiveCBridgeToNSString 1308 1306 -0.1% 1.00x(?)
DictionarySwapOfObjects 19706 19804 +0.5% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 120045 120106 +0.1% 1.00x(?)
RecursiveOwnedParameter 9411 9440 +0.3% 1.00x
Integrate 399 399 +0.0% 1.00x
ClassArrayGetter 930 930 +0.0% 1.00x
SetIntersect 10570 10556 -0.1% 1.00x
Array2D 604239 606885 +0.4% 1.00x
SortStrings 2656 2653 -0.1% 1.00x(?)
DictionaryBridge 3042 3043 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7183 7194 +0.1% 1.00x(?)
MonteCarloPi 53650 53568 -0.1% 1.00x
StringWithCString 343212 343012 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 7717 7716 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2701 2691 -0.4% 1.00x(?)
Prims 8970 8931 -0.4% 1.00x(?)
SortLettersInPlace 2720 2732 +0.4% 1.00x(?)
ReversedDictionary 25210 25236 +0.1% 1.00x(?)
ArrayAppendToFromGeneric 656 655 -0.1% 1.00x(?)
MapReduceString 2254 2249 -0.2% 1.00x(?)
PopFrontArray 10795 10815 +0.2% 1.00x(?)
Dictionary3OfObjects 2310 2316 +0.3% 1.00x(?)
RangeAssignment 5581 5587 +0.1% 1.00x(?)
MapReduceLazyCollectionShort 42862 42851 -0.0% 1.00x(?)
ByteSwap 10 10 +0.0% 1.00x
ArrayAppendGenericStructs 1312 1309 -0.2% 1.00x(?)
ArrayAppendLazyMap 223179 223440 +0.1% 1.00x(?)
ArrayPlusEqualFiveElementCollection 267414 267365 -0.0% 1.00x(?)
ObjectiveCBridgeStubToNSDate 15015 15066 +0.3% 1.00x(?)
XorLoop 22806 22806 +0.0% 1.00x
ObserverClosure 6614 6643 +0.4% 1.00x
AnyHashableWithAClass 85300 84972 -0.4% 1.00x
CharacterLiteralsSmall 1030 1030 +0.0% 1.00x
ObjectiveCBridgeStubToNSString 1546 1542 -0.3% 1.00x
ArrayAppendStrings 13677 13644 -0.2% 1.00x(?)
ObjectiveCBridgeStubFromNSString 967 969 +0.2% 1.00x(?)
ProtocolDispatch 6365 6365 +0.0% 1.00x
ObjectAllocation 628 628 +0.0% 1.00x
StringHasSuffixUnicode 62942 62727 -0.3% 1.00x(?)
ArrayLiteral 1484 1485 +0.1% 1.00x
ProtocolDispatch2 426 424 -0.5% 1.00x
CStringLongAscii 17107 17103 -0.0% 1.00x(?)
SetIntersect_OfObjects 11171 11185 +0.1% 1.00x(?)
Join 1332 1336 +0.3% 1.00x(?)
ArrayOfRef 8573 8564 -0.1% 1.00x(?)
ObserverUnappliedMethod 8436 8419 -0.2% 1.00x(?)
ObjectiveCBridgeStubDateMutation 515 515 +0.0% 1.00x
NSError 737 734 -0.4% 1.00x(?)
DictionaryOfObjects 4812 4835 +0.5% 1.00x(?)
PopFrontArrayGeneric 8109 8133 +0.3% 1.00x(?)
PopFrontUnsafePointer 160588 160567 -0.0% 1.00x(?)
MapReduceAnyCollectionShort 46723 46855 +0.3% 1.00x(?)
StringAdder 1805 1804 -0.1% 1.00x(?)
ObjectiveCBridgeStubToNSStringRef 149 149 +0.0% 1.00x
ArrayAppendFromGeneric 655 657 +0.3% 1.00x(?)
MapReduce 36300 36358 +0.2% 1.00x(?)
MapReduceShort 46647 46675 +0.1% 1.00x(?)
IterateData 11144 11181 +0.3% 1.00x
DictionaryLiteral 13159 13143 -0.1% 1.00x(?)
Hanoi 16735 16679 -0.3% 1.00x(?)
ArrayOfGenericPOD 3073 3073 +0.0% 1.00x
DictionaryRemoveOfObjects 52630 52791 +0.3% 1.00x(?)
UTF8Decode 37110 37128 +0.1% 1.00x(?)
SortStringsUnicode 8816 8832 +0.2% 1.00x(?)
SetExclusiveOr 20722 20733 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 97729 97895 +0.2% 1.00x(?)
SetIsSubsetOf 1633 1633 +0.0% 1.00x
CStringShortAscii 9102 9132 +0.3% 1.00x(?)
MapReduceClassShort 51311 51156 -0.3% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 85862 85518 -0.4% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 1207 1205 -0.2% 1.00x
StringBuilder 2848 2850 +0.1% 1.00x(?)
ArrayOfGenericRef 9634 9634 +0.0% 1.00x
PolymorphicCalls 788 787 -0.1% 1.00x
Sim2DArray 29622 29623 +0.0% 1.00x(?)
SetExclusiveOr_OfObjects 41131 41132 +0.0% 1.00x(?)
ArrayAppendRepeatCol 202709 203490 +0.4% 1.00x
MapReduceShortString 234 233 -0.4% 1.00x(?)
MonteCarloE 83308 82955 -0.4% 1.00x
SetUnion_OfObjects 29604 29584 -0.1% 1.00x(?)
ReversedBidirectional 140303 140962 +0.5% 1.00x
GlobalClass 0 0 +0.0% 1.00x
ArrayAppendToGeneric 657 657 +0.0% 1.00x
HashTest 6053 6054 +0.0% 1.00x(?)
SetIsSubsetOf_OfObjects 1603 1605 +0.1% 1.00x
DictionaryRemove 18744 18768 +0.1% 1.00x(?)
LinkedList 33232 33178 -0.2% 1.00x(?)
MapReduceAnyCollection 36340 36351 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 75256 75490 +0.3% 1.00x(?)
RGBHistogramOfObjects 86465 86584 +0.1% 1.00x(?)
NSStringConversion 1272 1271 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7178 7149 -0.4% 1.00x(?)
ArrayAppendArrayOfInt 652 652 +0.0% 1.00x
Chars 8140 8132 -0.1% 1.00x(?)
MapReduceLazyCollection 32609 32674 +0.2% 1.00x(?)
ReversedArray 590 588 -0.3% 1.00x(?)
StrToInt 7589 7610 +0.3% 1.00x
ObserverForwarderStruct 4645 4648 +0.1% 1.00x(?)
CStringLongNonAscii 4435 4416 -0.4% 1.00x(?)
ArrayValueProp2 3627 3632 +0.1% 1.00x(?)
BitCount 102 102 +0.0% 1.00x
AngryPhonebook 3090 3096 +0.2% 1.00x(?)
ArrayPlusEqualArrayOfInt 654 654 +0.0% 1.00x
SevenBoom 1604 1608 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 73330 73437 +0.1% 1.00x(?)
ArrayValueProp 3018 3020 +0.1% 1.00x(?)
MapReduceClass 41581 41718 +0.3% 1.00x
ObjectiveCBridgeStubNSDateMutationRef 15091 15022 -0.5% 1.00x(?)
Memset 44519 44517 -0.0% 1.00x(?)
Dictionary2OfObjects 6195 6184 -0.2% 1.00x(?)
ArrayValueProp4 3326 3327 +0.0% 1.00x(?)
ArrayValueProp3 3422 3413 -0.3% 1.00x(?)
ObserverPartiallyAppliedMethod 8091 8096 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 147915 149820 +1.3% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 44371 45013 +1.4% 0.99x(?)
StringEdits 869819 874717 +0.6% 0.99x(?)
DictionarySwap 5481 5520 +0.7% 0.99x
StringUTF16Builder 3825 3863 +1.0% 0.99x(?)
SuperChars 275718 279358 +1.3% 0.99x(?)
StringInterpolation 14784 14866 +0.6% 0.99x(?)
ObjectiveCBridgeStubFromNSStringRef 216 218 +0.9% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObject 67382 67750 +0.6% 0.99x(?)
CharacterLiteralsLarge 13993 14122 +0.9% 0.99x
Walsh 11930 12002 +0.6% 0.99x
Dictionary3 1443 1457 +1.0% 0.99x
Dictionary2 3796 3820 +0.6% 0.99x(?)
StrComplexWalk 8614 8659 +0.5% 0.99x(?)
StringEqualPointerComparison 9587 9658 +0.7% 0.99x(?)
CaptureProp 97996 99248 +1.3% 0.99x
Dictionary 1803 1819 +0.9% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObject 25250 25405 +0.6% 0.99x(?)
ArrayInClass 4670 4722 +1.1% 0.99x
ObjectiveCBridgeFromNSString 3963 4001 +1.0% 0.99x(?)
RGBHistogram 32014 32320 +1.0% 0.99x(?)
SetUnion 11578 11666 +0.8% 0.99x
DeadArray 125016 126673 +1.3% 0.99x(?)
ObjectiveCBridgeStubNSDataAppend 2677 2694 +0.6% 0.99x(?)
ObjectiveCBridgeStubFromNSDate 4039 4066 +0.7% 0.99x
StringBuilderLong 1114 1140 +2.3% 0.98x
ObjectiveCBridgeToNSArray 28179 28645 +1.6% 0.98x(?)
ObjectiveCBridgeStubURLAppendPath 215890 219583 +1.7% 0.98x(?)
RC4 7380 7493 +1.5% 0.98x
Histogram 8627 8924 +3.4% 0.97x
ObjectiveCBridgeStubFromNSDateRef 3943 4066 +3.1% 0.97x
TypeFlood 169 174 +3.0% 0.97x(?)
NopDeinit 45870 47299 +3.1% 0.97x
ArrayOfPOD 1833 1891 +3.2% 0.97x
StringHasPrefix 1487 1546 +4.0% 0.96x
181 55366996 57700715 +4.2% 0.96x
StringWalk 21467 22395 +4.3% 0.96x
HashQuadratic 47794447 50106145 +4.8% 0.95x
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i5 Processor Speed: 2.8 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 3 MB Memory: 16 GB

@airspeedswift
Copy link
Member

So, based on the last round of benchmarks, we should rebase and merge this, right? Would help with binary size.

@airspeedswift
Copy link
Member

cc @bob-wilson

@airspeedswift
Copy link
Member

I rebase this as #9135 since things have changed quite a lot in the mean-time.

@bob-wilson
Copy link
Contributor

Those benchmark results look OK to me. If anyone else has concerns, speak up!

@natecook1000
Copy link
Member Author

Thanks @airspeedswift!

@natecook1000 natecook1000 deleted the nc-sort-degyb branch May 1, 2017 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants