-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix some Array-related performance regressions introduced by the new … #2370
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
Fix some Array-related performance regressions introduced by the new … #2370
Conversation
@swift-ci Please benchmark |
@gribozavr Do you mind reviewing these small changes? |
@swift-ci Please test |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StringHasPrefix | 578 | 691 | +19.6% | 0.84x |
OpenClose | 50 | 53 | +6.0% | 0.94x |
Improvement (8)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StringHasSuffix | 763 | 705 | -7.6% | 1.08x |
RangeAssignment | 324 | 298 | -8.0% | 1.09x |
ObjectAllocation | 155 | 142 | -8.4% | 1.09x |
MapReduce | 386 | 335 | -13.2% | 1.15x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 190175 | 166051 | -12.7% | 1.15x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 187577 | 162121 | -13.6% | 1.16x |
ObjectiveCBridgeStubFromArrayOfNSString | 135864 | 114996 | -15.4% | 1.18x |
ObjectiveCBridgeFromNSArrayAnyObject | 87247 | 65370 | -25.1% | 1.33x |
No Changes (111)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
DictionaryLiteral | 3166 | 3018 | -4.7% | 1.05x |
NopDeinit | 36546 | 35189 | -3.7% | 1.04x |
ObjectiveCBridgeToNSDictionary | 17658 | 17057 | -3.4% | 1.04x(?) |
BitCount | 24 | 23 | -4.2% | 1.04x |
Hanoi | 3406 | 3301 | -3.1% | 1.03x |
ArrayOfGenericRef | 3624 | 3509 | -3.2% | 1.03x(?) |
120 | 2803012 | 2730422 | -2.6% | 1.03x |
PopFrontArray | 1083 | 1065 | -1.7% | 1.02x |
StringInterpolation | 11729 | 11498 | -2.0% | 1.02x |
StaticArray | 2715 | 2664 | -1.9% | 1.02x(?) |
NSDictionaryCastToSwift | 8751 | 8602 | -1.7% | 1.02x |
NSStringConversion | 608 | 596 | -2.0% | 1.02x |
ObjectiveCBridgeFromNSSetAnyObjectForced | 4132 | 4052 | -1.9% | 1.02x(?) |
SortStrings | 1803 | 1790 | -0.7% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 4642 | 4598 | -0.9% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 3693 | 3656 | -1.0% | 1.01x(?) |
ObjectiveCBridgeFromNSStringForced | 2217 | 2201 | -0.7% | 1.01x(?) |
Prims | 722 | 715 | -1.0% | 1.01x |
SuperChars | 221829 | 220102 | -0.8% | 1.01x(?) |
ErrorHandling | 2937 | 2918 | -0.7% | 1.01x(?) |
StringHasSuffixUnicode | 62808 | 62226 | -0.9% | 1.01x(?) |
ObjectiveCBridgeToNSSet | 16615 | 16463 | -0.9% | 1.01x(?) |
CaptureProp | 4102 | 4074 | -0.7% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToString | 210142 | 208488 | -0.8% | 1.01x(?) |
DeadArray | 173 | 172 | -0.6% | 1.01x(?) |
ArraySubscript | 1328 | 1324 | -0.3% | 1.00x(?) |
ObjectiveCBridgeToNSString | 1041 | 1044 | +0.3% | 1.00x |
DictionarySwapOfObjects | 6661 | 6661 | +0.0% | 1.00x |
StackPromo | 18776 | 18768 | -0.0% | 1.00x(?) |
RecursiveOwnedParameter | 1829 | 1825 | -0.2% | 1.00x |
Integrate | 232 | 233 | +0.4% | 1.00x(?) |
ClassArrayGetter | 12 | 12 | +0.0% | 1.00x |
Histogram | 640 | 639 | -0.2% | 1.00x(?) |
MonteCarloPi | 42645 | 42531 | -0.3% | 1.00x |
StringWithCString | 362935 | 363290 | +0.1% | 1.00x(?) |
SortLettersInPlace | 959 | 961 | +0.2% | 1.00x(?) |
Dictionary3OfObjects | 861 | 859 | -0.2% | 1.00x(?) |
ByteSwap | 1 | 1 | +0.0% | 1.00x |
XorLoop | 359 | 359 | +0.0% | 1.00x |
ProtocolDispatch | 3238 | 3241 | +0.1% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSSetAnyObject | 137926 | 137567 | -0.3% | 1.00x(?) |
ProtocolDispatch2 | 154 | 154 | +0.0% | 1.00x |
Dictionary2 | 2046 | 2042 | -0.2% | 1.00x(?) |
StrComplexWalk | 3159 | 3144 | -0.5% | 1.00x(?) |
SetIntersect_OfObjects | 2330 | 2325 | -0.2% | 1.00x(?) |
ObjectiveCBridgeToNSArray | 31171 | 31283 | +0.4% | 1.00x(?) |
NSError | 271 | 271 | +0.0% | 1.00x |
PopFrontUnsafePointer | 8657 | 8648 | -0.1% | 1.00x(?) |
StringEqualPointerComparison | 7169 | 7142 | -0.4% | 1.00x(?) |
PolymorphicCalls | 60 | 60 | +0.0% | 1.00x |
ArrayOfGenericPOD | 208 | 207 | -0.5% | 1.00x |
DictionaryRemoveOfObjects | 19440 | 19481 | +0.2% | 1.00x(?) |
UTF8Decode | 312 | 312 | +0.0% | 1.00x |
ObjectiveCBridgeStubToArrayOfNSString | 31685 | 31564 | -0.4% | 1.00x(?) |
RGBHistogramOfObjects | 21472 | 21477 | +0.0% | 1.00x(?) |
StringBuilder | 1396 | 1395 | -0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 1552 | 1557 | +0.3% | 1.00x(?) |
Phonebook | 7396 | 7392 | -0.1% | 1.00x(?) |
Sim2DArray | 422 | 423 | +0.2% | 1.00x(?) |
MonteCarloE | 9973 | 9956 | -0.2% | 1.00x(?) |
HashTest | 1845 | 1846 | +0.1% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 611 | 614 | +0.5% | 1.00x |
ArrayAppend | 732 | 730 | -0.3% | 1.00x(?) |
DictionaryRemove | 4896 | 4892 | -0.1% | 1.00x(?) |
LinkedList | 6845 | 6837 | -0.1% | 1.00x(?) |
RGBHistogram | 3354 | 3359 | +0.1% | 1.00x(?) |
ArrayAppendReserved | 509 | 509 | +0.0% | 1.00x |
ArrayOfPOD | 172 | 172 | +0.0% | 1.00x |
SetUnion | 4009 | 4010 | +0.0% | 1.00x(?) |
ArrayLiteral | 999 | 1002 | +0.3% | 1.00x(?) |
ArrayValueProp | 10 | 10 | +0.0% | 1.00x |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 222 | 222 | +0.0% | 1.00x |
Dictionary2OfObjects | 3422 | 3407 | -0.4% | 1.00x |
ArrayValueProp4 | 10 | 10 | +0.0% | 1.00x |
TwoSum | 1682 | 1688 | +0.4% | 1.00x(?) |
ArrayValueProp2 | 10 | 10 | +0.0% | 1.00x |
ArrayValueProp3 | 10 | 10 | +0.0% | 1.00x |
Array2D | 1958 | 1976 | +0.9% | 0.99x(?) |
DictionaryBridge | 3556 | 3574 | +0.5% | 0.99x(?) |
DictionarySwap | 769 | 773 | +0.5% | 0.99x(?) |
ObjectiveCBridgeStubFromNSString | 704 | 713 | +1.3% | 0.99x(?) |
Dictionary3 | 517 | 521 | +0.8% | 0.99x(?) |
Join | 478 | 484 | +1.3% | 0.99x |
DictionaryOfObjects | 2242 | 2256 | +0.6% | 0.99x(?) |
PopFrontArrayGeneric | 1066 | 1078 | +1.1% | 0.99x(?) |
SortStringsUnicode | 9217 | 9314 | +1.1% | 0.99x(?) |
SetIsSubsetOf | 555 | 559 | +0.7% | 0.99x |
SetIntersect | 1300 | 1311 | +0.8% | 0.99x |
SetExclusiveOr | 4554 | 4586 | +0.7% | 0.99x(?) |
SetExclusiveOr_OfObjects | 9957 | 10107 | +1.5% | 0.99x |
SetUnion_OfObjects | 8508 | 8588 | +0.9% | 0.99x |
StringHasPrefixUnicode | 15125 | 15334 | +1.4% | 0.99x |
StrToInt | 6082 | 6117 | +0.6% | 0.99x(?) |
SevenBoom | 1287 | 1299 | +0.9% | 0.99x |
StringWalk | 6097 | 6143 | +0.8% | 0.99x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 193341 | 196498 | +1.6% | 0.98x(?) |
ObjectiveCBridgeStubToNSString | 1378 | 1405 | +2.0% | 0.98x |
ObjectiveCBridgeStubFromNSStringRef | 328 | 335 | +2.1% | 0.98x |
AngryPhonebook | 3365 | 3433 | +2.0% | 0.98x(?) |
RC4 | 241 | 247 | +2.5% | 0.98x |
Walsh | 304 | 314 | +3.3% | 0.97x(?) |
ArrayOfRef | 3457 | 3576 | +3.4% | 0.97x(?) |
Calculator | 35 | 36 | +2.9% | 0.97x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 119808 | 123340 | +3.0% | 0.97x(?) |
Dictionary | 731 | 754 | +3.1% | 0.97x |
ArrayInClass | 82 | 85 | +3.7% | 0.96x |
Chars | 609 | 634 | +4.1% | 0.96x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 187891 | 198177 | +5.5% | 0.95x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 105896 | 111662 | +5.4% | 0.95x(?) |
Regression (4)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StringWithCString | 756725 | 936015 | +23.7% | 0.81x |
PopFrontUnsafePointer | 97767 | 111660 | +14.2% | 0.88x |
StringHasSuffix | 1481 | 1687 | +13.9% | 0.88x |
Phonebook | 121871 | 130358 | +7.0% | 0.93x(?) |
Improvement (18)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ArrayOfGenericPOD | 3692 | 3499 | -5.2% | 1.06x |
TypeFlood | 149 | 141 | -5.4% | 1.06x(?) |
RGBHistogram | 101790 | 96341 | -5.3% | 1.06x |
ArrayOfPOD | 2401 | 2268 | -5.5% | 1.06x |
StringWalk | 23723 | 22435 | -5.4% | 1.06x |
ByteSwap | 10 | 9 | -10.0% | 1.11x |
DictionarySwap | 12669 | 11100 | -12.4% | 1.14x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 192692 | 165920 | -13.9% | 1.16x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 191792 | 164913 | -14.0% | 1.16x |
ObjectiveCBridgeStubFromArrayOfNSString | 134250 | 112518 | -16.2% | 1.19x |
Histogram | 16439 | 13577 | -17.4% | 1.21x |
DictionaryLiteral | 26474 | 21652 | -18.2% | 1.22x |
MonteCarloE | 141340 | 110702 | -21.7% | 1.28x |
ObjectiveCBridgeFromNSArrayAnyObject | 90777 | 69115 | -23.9% | 1.31x |
Join | 2190 | 1494 | -31.8% | 1.47x |
MapReduce | 77359 | 44900 | -42.0% | 1.72x |
UTF8Decode | 72164 | 41112 | -43.0% | 1.76x |
RangeAssignment | 52771 | 22470 | -57.4% | 2.35x |
No Changes (99)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StrToInt | 6953 | 6622 | -4.8% | 1.05x |
NSError | 670 | 647 | -3.4% | 1.04x(?) |
Sim2DArray | 14122 | 13577 | -3.9% | 1.04x |
Prims | 14246 | 13840 | -2.9% | 1.03x |
PolymorphicCalls | 1174 | 1143 | -2.6% | 1.03x |
NSDictionaryCastToSwift | 10169 | 9891 | -2.7% | 1.03x(?) |
RGBHistogramOfObjects | 150952 | 146060 | -3.2% | 1.03x |
Chars | 5345 | 5172 | -3.2% | 1.03x(?) |
StackPromo | 166293 | 162670 | -2.2% | 1.02x(?) |
Integrate | 353 | 347 | -1.7% | 1.02x(?) |
ObjectiveCBridgeStubFromNSString | 1146 | 1119 | -2.4% | 1.02x |
ProtocolDispatch2 | 432 | 425 | -1.6% | 1.02x(?) |
Calculator | 965 | 950 | -1.6% | 1.02x |
OpenClose | 466 | 458 | -1.7% | 1.02x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 130173 | 127277 | -2.2% | 1.02x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 31836 | 31202 | -2.0% | 1.02x(?) |
StringHasPrefixUnicode | 16861 | 16517 | -2.0% | 1.02x |
DeadArray | 141830 | 138935 | -2.0% | 1.02x(?) |
BitCount | 91 | 89 | -2.2% | 1.02x |
ArrayValueProp2 | 2786 | 2725 | -2.2% | 1.02x |
DictionaryBridge | 3675 | 3645 | -0.8% | 1.01x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 7199 | 7096 | -1.4% | 1.01x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 7040 | 7004 | -0.5% | 1.01x(?) |
ObjectiveCBridgeFromNSStringForced | 2643 | 2628 | -0.6% | 1.01x(?) |
PopFrontArray | 24193 | 23851 | -1.4% | 1.01x(?) |
StringInterpolation | 16988 | 16895 | -0.6% | 1.01x(?) |
SortStringsUnicode | 11720 | 11592 | -1.1% | 1.01x(?) |
Dictionary | 2740 | 2720 | -0.7% | 1.01x |
ObjectiveCBridgeFromNSSetAnyObjectToString | 229937 | 228031 | -0.8% | 1.01x(?) |
StringBuilder | 2995 | 2951 | -1.5% | 1.01x(?) |
ObjectiveCBridgeToNSDictionary | 17088 | 16997 | -0.5% | 1.01x(?) |
SetUnion_OfObjects | 65437 | 64824 | -0.9% | 1.01x |
RC4 | 8497 | 8446 | -0.6% | 1.01x |
SetIsSubsetOf_OfObjects | 2874 | 2847 | -0.9% | 1.01x |
LinkedList | 26360 | 26051 | -1.2% | 1.01x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 7650 | 7594 | -0.7% | 1.01x(?) |
ArrayValueProp | 2203 | 2183 | -0.9% | 1.01x |
TwoSum | 9171 | 9109 | -0.7% | 1.01x |
ObjectiveCBridgeToNSString | 1078 | 1077 | -0.1% | 1.00x(?) |
DictionarySwapOfObjects | 24967 | 24877 | -0.4% | 1.00x(?) |
ClassArrayGetter | 1184 | 1183 | -0.1% | 1.00x(?) |
MonteCarloPi | 50708 | 50675 | -0.1% | 1.00x(?) |
SortLettersInPlace | 7684 | 7686 | +0.0% | 1.00x(?) |
Dictionary3OfObjects | 2647 | 2646 | -0.0% | 1.00x(?) |
SuperChars | 544122 | 544958 | +0.1% | 1.00x(?) |
XorLoop | 18538 | 18540 | +0.0% | 1.00x(?) |
ObjectiveCBridgeStubToNSString | 1684 | 1680 | -0.2% | 1.00x(?) |
ObjectiveCBridgeStubFromNSStringRef | 652 | 651 | -0.1% | 1.00x(?) |
StaticArray | 26584 | 26499 | -0.3% | 1.00x(?) |
StringHasSuffixUnicode | 63731 | 63988 | +0.4% | 1.00x(?) |
ArrayLiteral | 1049 | 1050 | +0.1% | 1.00x(?) |
HashTest | 5519 | 5546 | +0.5% | 1.00x(?) |
Dictionary3 | 2024 | 2023 | -0.1% | 1.00x(?) |
SetIntersect_OfObjects | 18883 | 18964 | +0.4% | 1.00x |
ErrorHandling | 3848 | 3855 | +0.2% | 1.00x(?) |
ArrayOfRef | 8853 | 8874 | +0.2% | 1.00x(?) |
ObjectiveCBridgeToNSArray | 31124 | 31154 | +0.1% | 1.00x(?) |
DictionaryOfObjects | 5453 | 5478 | +0.5% | 1.00x(?) |
PopFrontArrayGeneric | 11094 | 11070 | -0.2% | 1.00x(?) |
CaptureProp | 114155 | 114646 | +0.4% | 1.00x |
Hanoi | 18945 | 19038 | +0.5% | 1.00x |
DictionaryRemoveOfObjects | 61375 | 61476 | +0.2% | 1.00x(?) |
NopDeinit | 54971 | 54966 | -0.0% | 1.00x(?) |
SetExclusiveOr | 55660 | 55517 | -0.3% | 1.00x(?) |
ArrayInClass | 3647 | 3649 | +0.1% | 1.00x(?) |
ArrayOfGenericRef | 9530 | 9527 | -0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 5075 | 5070 | -0.1% | 1.00x(?) |
Walsh | 12161 | 12174 | +0.1% | 1.00x(?) |
DictionaryRemove | 30995 | 31047 | +0.2% | 1.00x(?) |
SetUnion | 41741 | 41897 | +0.4% | 1.00x(?) |
AngryPhonebook | 4091 | 4071 | -0.5% | 1.00x(?) |
ArrayValueProp3 | 2651 | 2639 | -0.5% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 20641 | 20650 | +0.0% | 1.00x(?) |
Dictionary2OfObjects | 7048 | 7057 | +0.1% | 1.00x(?) |
SevenBoom | 1448 | 1451 | +0.2% | 1.00x(?) |
RecursiveOwnedParameter | 7562 | 7607 | +0.6% | 0.99x(?) |
SortStrings | 3824 | 3880 | +1.5% | 0.99x |
120 | 6252252 | 6304956 | +0.8% | 0.99x |
ObjectAllocation | 526 | 529 | +0.6% | 0.99x(?) |
Dictionary2 | 5238 | 5265 | +0.5% | 0.99x(?) |
StrComplexWalk | 8319 | 8423 | +1.2% | 0.99x(?) |
ObjectiveCBridgeToNSSet | 16522 | 16707 | +1.1% | 0.99x(?) |
StringEqualPointerComparison | 9487 | 9563 | +0.8% | 0.99x(?) |
SetExclusiveOr_OfObjects | 80577 | 81255 | +0.8% | 0.99x |
NSStringConversion | 2605 | 2628 | +0.9% | 0.99x(?) |
SetIsSubsetOf | 2953 | 3003 | +1.7% | 0.98x |
SetIntersect | 19229 | 19575 | +1.8% | 0.98x |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 117861 | 120262 | +2.0% | 0.98x(?) |
ArrayAppendReserved | 2839 | 2900 | +2.1% | 0.98x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 142908 | 147361 | +3.1% | 0.97x |
ArrayAppend | 3000 | 3106 | +3.5% | 0.97x |
ObjectiveCBridgeFromNSDictionaryAnyObject | 197628 | 205356 | +3.9% | 0.96x(?) |
ArraySubscript | 5325 | 5587 | +4.9% | 0.95x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 198527 | 208805 | +5.2% | 0.95x |
Array2D | 764168 | 801997 | +5.0% | 0.95x |
StringHasPrefix | 1453 | 1537 | +5.8% | 0.95x |
ProtocolDispatch | 5664 | 5956 | +5.2% | 0.95x |
ArrayValueProp4 | 2586 | 2712 | +4.9% | 0.95x |
@swift-ci Please benchmark |
Build comment file:Optimized (O)
|
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StringHasPrefix | 577 | 692 | +19.9% | 0.83x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 186362 | 197867 | +6.2% | 0.94x(?) |
Improvement (8)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
CaptureProp | 4267 | 4034 | -5.5% | 1.06x |
MapReduce | 363 | 335 | -7.7% | 1.08x |
RangeAssignment | 326 | 296 | -9.2% | 1.10x |
StringHasSuffix | 758 | 685 | -9.6% | 1.11x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 191962 | 168180 | -12.4% | 1.14x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 199215 | 166821 | -16.3% | 1.19x |
ObjectiveCBridgeStubFromArrayOfNSString | 135713 | 113974 | -16.0% | 1.19x |
ObjectiveCBridgeFromNSArrayAnyObject | 86962 | 65638 | -24.5% | 1.32x |
No Changes (111)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
Hanoi | 3414 | 3283 | -3.8% | 1.04x |
NopDeinit | 36495 | 35233 | -3.5% | 1.04x |
BitCount | 24 | 23 | -4.2% | 1.04x |
ObjectiveCBridgeFromNSDictionaryAnyObject | 194064 | 189208 | -2.5% | 1.03x(?) |
ObjectiveCBridgeToNSSet | 17204 | 16657 | -3.2% | 1.03x(?) |
ObjectiveCBridgeStubToArrayOfNSString | 31933 | 30951 | -3.1% | 1.03x |
NSDictionaryCastToSwift | 8788 | 8569 | -2.5% | 1.03x |
ObjectiveCBridgeFromNSSetAnyObjectToString | 216005 | 209838 | -2.9% | 1.03x(?) |
120 | 2826431 | 2743562 | -2.9% | 1.03x |
Array2D | 2011 | 1973 | -1.9% | 1.02x(?) |
ErrorHandling | 2933 | 2882 | -1.7% | 1.02x(?) |
Walsh | 313 | 306 | -2.2% | 1.02x(?) |
NSError | 270 | 266 | -1.5% | 1.02x |
PolymorphicCalls | 61 | 60 | -1.6% | 1.02x |
DictionaryLiteral | 3076 | 3030 | -1.5% | 1.02x(?) |
Sim2DArray | 424 | 417 | -1.6% | 1.02x(?) |
ObjectiveCBridgeToNSDictionary | 17963 | 17669 | -1.6% | 1.02x(?) |
DictionarySwapOfObjects | 6653 | 6596 | -0.9% | 1.01x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 4601 | 4552 | -1.1% | 1.01x(?) |
SuperChars | 221506 | 219699 | -0.8% | 1.01x(?) |
StaticArray | 2702 | 2680 | -0.8% | 1.01x(?) |
ProtocolDispatch | 3238 | 3218 | -0.6% | 1.01x(?) |
ObjectAllocation | 143 | 141 | -1.4% | 1.01x(?) |
Dictionary3 | 521 | 517 | -0.8% | 1.01x |
StrComplexWalk | 3152 | 3126 | -0.8% | 1.01x |
ObjectiveCBridgeToNSArray | 30835 | 30520 | -1.0% | 1.01x(?) |
DictionaryOfObjects | 2251 | 2239 | -0.5% | 1.01x(?) |
SortStringsUnicode | 9170 | 9045 | -1.4% | 1.01x |
SetIsSubsetOf | 559 | 555 | -0.7% | 1.01x |
SetIntersect | 1311 | 1301 | -0.8% | 1.01x |
SetExclusiveOr | 4571 | 4520 | -1.1% | 1.01x |
ArrayInClass | 84 | 83 | -1.2% | 1.01x(?) |
SetExclusiveOr_OfObjects | 10099 | 10041 | -0.6% | 1.01x |
MonteCarloE | 10019 | 9921 | -1.0% | 1.01x |
SetUnion_OfObjects | 8703 | 8618 | -1.0% | 1.01x |
RGBHistogram | 3345 | 3323 | -0.7% | 1.01x(?) |
ArrayAppendReserved | 510 | 507 | -0.6% | 1.01x |
TwoSum | 1694 | 1679 | -0.9% | 1.01x(?) |
ArraySubscript | 1323 | 1323 | +0.0% | 1.00x |
ObjectiveCBridgeToNSString | 1029 | 1026 | -0.3% | 1.00x |
StackPromo | 18700 | 18748 | +0.3% | 1.00x(?) |
RecursiveOwnedParameter | 1827 | 1826 | -0.1% | 1.00x(?) |
Integrate | 235 | 234 | -0.4% | 1.00x |
ClassArrayGetter | 12 | 12 | +0.0% | 1.00x |
Histogram | 641 | 639 | -0.3% | 1.00x |
SortStrings | 1789 | 1788 | -0.1% | 1.00x(?) |
MonteCarloPi | 42626 | 42537 | -0.2% | 1.00x |
StringWithCString | 362858 | 362851 | -0.0% | 1.00x(?) |
Prims | 718 | 715 | -0.4% | 1.00x(?) |
SortLettersInPlace | 958 | 954 | -0.4% | 1.00x(?) |
DictionarySwap | 773 | 771 | -0.3% | 1.00x(?) |
ArrayOfGenericPOD | 208 | 207 | -0.5% | 1.00x |
Dictionary3OfObjects | 858 | 855 | -0.3% | 1.00x(?) |
ByteSwap | 1 | 1 | +0.0% | 1.00x |
XorLoop | 359 | 359 | +0.0% | 1.00x |
StringInterpolation | 11465 | 11504 | +0.3% | 1.00x(?) |
ObjectiveCBridgeStubFromNSStringRef | 327 | 327 | +0.0% | 1.00x |
ObjectiveCBridgeStubFromNSString | 704 | 701 | -0.4% | 1.00x(?) |
TypeFlood | 0 | 0 | +0.0% | 1.00x |
Dictionary2 | 2037 | 2043 | +0.3% | 1.00x |
SetIntersect_OfObjects | 2349 | 2342 | -0.3% | 1.00x(?) |
ArrayOfRef | 3493 | 3481 | -0.3% | 1.00x(?) |
PopFrontArrayGeneric | 1068 | 1067 | -0.1% | 1.00x(?) |
PopFrontUnsafePointer | 8659 | 8646 | -0.1% | 1.00x |
StringEqualPointerComparison | 7052 | 7059 | +0.1% | 1.00x(?) |
DictionaryRemoveOfObjects | 19496 | 19427 | -0.3% | 1.00x |
UTF8Decode | 312 | 311 | -0.3% | 1.00x(?) |
RGBHistogramOfObjects | 21364 | 21413 | +0.2% | 1.00x |
StrToInt | 6064 | 6094 | +0.5% | 1.00x(?) |
ArrayOfGenericRef | 3554 | 3551 | -0.1% | 1.00x(?) |
ObjectiveCBridgeFromNSString | 1551 | 1558 | +0.5% | 1.00x(?) |
Phonebook | 7372 | 7396 | +0.3% | 1.00x(?) |
HashTest | 1831 | 1837 | +0.3% | 1.00x(?) |
SetIsSubsetOf_OfObjects | 611 | 612 | +0.2% | 1.00x |
ArrayAppend | 732 | 733 | +0.1% | 1.00x(?) |
LinkedList | 6845 | 6846 | +0.0% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 107406 | 107328 | -0.1% | 1.00x(?) |
NSStringConversion | 596 | 597 | +0.2% | 1.00x(?) |
ArrayOfPOD | 172 | 172 | +0.0% | 1.00x |
SetUnion | 3997 | 3987 | -0.2% | 1.00x(?) |
StringBuilder | 1392 | 1394 | +0.1% | 1.00x(?) |
DeadArray | 173 | 173 | +0.0% | 1.00x |
AngryPhonebook | 3413 | 3406 | -0.2% | 1.00x(?) |
ArrayValueProp3 | 10 | 10 | +0.0% | 1.00x |
StringWalk | 6043 | 6057 | +0.2% | 1.00x(?) |
ArrayValueProp | 10 | 10 | +0.0% | 1.00x |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 222 | 222 | +0.0% | 1.00x |
ArrayValueProp4 | 10 | 10 | +0.0% | 1.00x |
ArrayValueProp2 | 10 | 10 | +0.0% | 1.00x |
SevenBoom | 1283 | 1280 | -0.2% | 1.00x(?) |
PopFrontArray | 1061 | 1072 | +1.0% | 0.99x(?) |
DictionaryBridge | 3702 | 3742 | +1.1% | 0.99x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 3629 | 3649 | +0.6% | 0.99x(?) |
ObjectiveCBridgeStubToNSString | 1376 | 1384 | +0.6% | 0.99x(?) |
StringHasSuffixUnicode | 62307 | 62982 | +1.1% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObject | 136014 | 137454 | +1.1% | 0.99x(?) |
ProtocolDispatch2 | 154 | 155 | +0.7% | 0.99x |
Join | 479 | 486 | +1.5% | 0.99x |
DictionaryRemove | 4878 | 4940 | +1.3% | 0.99x(?) |
StringHasPrefixUnicode | 15036 | 15214 | +1.2% | 0.99x(?) |
ObjectiveCBridgeFromNSSetAnyObjectForced | 3995 | 4043 | +1.2% | 0.99x(?) |
Chars | 619 | 628 | +1.4% | 0.99x(?) |
Dictionary2OfObjects | 3403 | 3427 | +0.7% | 0.99x(?) |
ArrayLiteral | 1002 | 1021 | +1.9% | 0.98x(?) |
Dictionary | 729 | 744 | +2.1% | 0.98x |
RC4 | 241 | 247 | +2.5% | 0.98x |
Calculator | 35 | 36 | +2.9% | 0.97x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 121159 | 124654 | +2.9% | 0.97x(?) |
ObjectiveCBridgeFromNSStringForced | 2190 | 2277 | +4.0% | 0.96x(?) |
OpenClose | 50 | 52 | +4.0% | 0.96x |
Regression (3)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
PopFrontUnsafePointer | 97771 | 113119 | +15.7% | 0.86x |
StringHasSuffix | 1479 | 1657 | +12.0% | 0.89x |
Array2D | 846271 | 896328 | +5.9% | 0.94x |
Improvement (15)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
StrToInt | 6966 | 6482 | -7.0% | 1.07x(?) |
120 | 6622171 | 6206178 | -6.3% | 1.07x |
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced | 188312 | 170861 | -9.3% | 1.10x |
ObjectiveCBridgeFromNSArrayAnyObjectToString | 190801 | 167500 | -12.2% | 1.14x |
ObjectiveCBridgeStubFromArrayOfNSString | 132171 | 114426 | -13.4% | 1.16x |
Histogram | 16464 | 13635 | -17.2% | 1.21x |
DictionaryLiteral | 26739 | 21504 | -19.6% | 1.24x |
StringWithCString | 936560 | 743699 | -20.6% | 1.26x |
StringWalk | 31601 | 24810 | -21.5% | 1.27x |
ObjectiveCBridgeFromNSArrayAnyObject | 90463 | 69102 | -23.6% | 1.31x |
MonteCarloE | 138482 | 103982 | -24.9% | 1.33x |
Join | 2193 | 1474 | -32.8% | 1.49x |
UTF8Decode | 71906 | 41294 | -42.6% | 1.74x |
MapReduce | 79485 | 44201 | -44.4% | 1.80x |
RangeAssignment | 51215 | 22276 | -56.5% | 2.30x |
No Changes (103)
TEST | OLD_MIN | NEW_MIN | DELTA (%) | SPEEDUP |
---|---|---|---|---|
ObjectiveCBridgeFromNSSetAnyObjectToString | 235931 | 224592 | -4.8% | 1.05x(?) |
Prims | 14249 | 13751 | -3.5% | 1.04x |
TypeFlood | 150 | 144 | -4.0% | 1.04x(?) |
RGBHistogram | 100532 | 96457 | -4.0% | 1.04x |
ArrayOfPOD | 2395 | 2295 | -4.2% | 1.04x |
RGBHistogramOfObjects | 149538 | 145795 | -2.5% | 1.03x |
Chars | 5334 | 5194 | -2.6% | 1.03x |
BitCount | 92 | 89 | -3.3% | 1.03x(?) |
RecursiveOwnedParameter | 7667 | 7531 | -1.8% | 1.02x |
ObjectiveCBridgeFromNSStringForced | 2594 | 2542 | -2.0% | 1.02x(?) |
ArrayOfGenericPOD | 3561 | 3483 | -2.2% | 1.02x |
StringInterpolation | 17444 | 17070 | -2.1% | 1.02x |
ObjectiveCBridgeFromNSSetAnyObject | 144733 | 141463 | -2.3% | 1.02x(?) |
NSError | 657 | 645 | -1.8% | 1.02x |
PolymorphicCalls | 1158 | 1137 | -1.8% | 1.02x |
NSDictionaryCastToSwift | 10010 | 9773 | -2.4% | 1.02x |
DeadArray | 143515 | 141365 | -1.5% | 1.02x |
ArrayValueProp2 | 2760 | 2698 | -2.2% | 1.02x(?) |
PopFrontArray | 23814 | 23483 | -1.4% | 1.01x(?) |
ObjectiveCBridgeStubFromNSString | 1136 | 1127 | -0.8% | 1.01x(?) |
StringHasSuffixUnicode | 63622 | 62777 | -1.3% | 1.01x(?) |
ErrorHandling | 3903 | 3877 | -0.7% | 1.01x(?) |
ArrayOfRef | 8885 | 8822 | -0.7% | 1.01x |
DictionaryOfObjects | 5517 | 5484 | -0.6% | 1.01x(?) |
Calculator | 967 | 957 | -1.0% | 1.01x |
SetIsSubsetOf | 3023 | 2984 | -1.3% | 1.01x |
ObjectiveCBridgeStubToArrayOfNSString | 31557 | 31254 | -1.0% | 1.01x |
ArrayOfGenericRef | 9477 | 9429 | -0.5% | 1.01x(?) |
ObjectiveCBridgeFromNSString | 5097 | 5031 | -1.3% | 1.01x |
SetIsSubsetOf_OfObjects | 2864 | 2843 | -0.7% | 1.01x |
SevenBoom | 1440 | 1428 | -0.8% | 1.01x |
ArrayValueProp | 2179 | 2165 | -0.6% | 1.01x(?) |
ObjectiveCBridgeToNSString | 1061 | 1058 | -0.3% | 1.00x(?) |
DictionarySwapOfObjects | 24856 | 24979 | +0.5% | 1.00x(?) |
Integrate | 351 | 351 | +0.0% | 1.00x |
ClassArrayGetter | 1183 | 1183 | +0.0% | 1.00x |
ObjectiveCBridgeFromNSDictionaryAnyObjectForced | 7148 | 7162 | +0.2% | 1.00x(?) |
MonteCarloPi | 50676 | 50675 | -0.0% | 1.00x(?) |
Dictionary3OfObjects | 2657 | 2652 | -0.2% | 1.00x(?) |
ByteSwap | 9 | 9 | +0.0% | 1.00x |
XorLoop | 18536 | 18543 | +0.0% | 1.00x |
ObjectiveCBridgeStubToNSString | 1674 | 1674 | +0.0% | 1.00x |
ObjectiveCBridgeStubFromNSStringRef | 651 | 651 | +0.0% | 1.00x |
ObjectAllocation | 525 | 526 | +0.2% | 1.00x(?) |
ArrayLiteral | 1046 | 1046 | +0.0% | 1.00x |
ProtocolDispatch2 | 426 | 424 | -0.5% | 1.00x(?) |
Dictionary3 | 2025 | 2027 | +0.1% | 1.00x(?) |
Dictionary2 | 5241 | 5267 | +0.5% | 1.00x(?) |
SetIntersect_OfObjects | 18830 | 18889 | +0.3% | 1.00x |
PopFrontArrayGeneric | 10988 | 11021 | +0.3% | 1.00x(?) |
StringEqualPointerComparison | 9513 | 9509 | -0.0% | 1.00x(?) |
CaptureProp | 113002 | 113012 | +0.0% | 1.00x(?) |
Hanoi | 18841 | 18916 | +0.4% | 1.00x(?) |
DictionaryRemoveOfObjects | 61533 | 61670 | +0.2% | 1.00x(?) |
Dictionary | 2725 | 2729 | +0.1% | 1.00x(?) |
SetIntersect | 18951 | 19035 | +0.4% | 1.00x(?) |
SetExclusiveOr | 55412 | 55516 | +0.2% | 1.00x(?) |
ArrayInClass | 3647 | 3648 | +0.0% | 1.00x(?) |
Sim2DArray | 14426 | 14433 | +0.1% | 1.00x |
SetExclusiveOr_OfObjects | 80576 | 80441 | -0.2% | 1.00x(?) |
ObjectiveCBridgeToNSDictionary | 17625 | 17623 | -0.0% | 1.00x(?) |
SetUnion_OfObjects | 64892 | 64741 | -0.2% | 1.00x(?) |
RC4 | 8447 | 8453 | +0.1% | 1.00x(?) |
HashTest | 5521 | 5500 | -0.4% | 1.00x(?) |
ObjectiveCBridgeToNSSet | 17323 | 17301 | -0.1% | 1.00x(?) |
DictionaryRemove | 31108 | 31002 | -0.3% | 1.00x(?) |
LinkedList | 26386 | 26345 | -0.2% | 1.00x(?) |
ObjectiveCBridgeFromNSSetAnyObjectToStringForced | 118118 | 118195 | +0.1% | 1.00x(?) |
SetUnion | 41504 | 41599 | +0.2% | 1.00x(?) |
AngryPhonebook | 4090 | 4089 | -0.0% | 1.00x(?) |
GlobalClass | 0 | 0 | +0.0% | 1.00x |
Memset | 20646 | 20644 | -0.0% | 1.00x(?) |
Dictionary2OfObjects | 7011 | 7021 | +0.1% | 1.00x(?) |
TwoSum | 9159 | 9117 | -0.5% | 1.00x(?) |
ArrayValueProp3 | 2650 | 2642 | -0.3% | 1.00x(?) |
SortStrings | 3817 | 3859 | +1.1% | 0.99x |
SortLettersInPlace | 7547 | 7644 | +1.3% | 0.99x(?) |
SuperChars | 537660 | 544877 | +1.3% | 0.99x(?) |
StaticArray | 26433 | 26753 | +1.2% | 0.99x(?) |
Walsh | 12072 | 12158 | +0.7% | 0.99x |
StrComplexWalk | 8289 | 8378 | +1.1% | 0.99x(?) |
SortStringsUnicode | 11457 | 11555 | +0.9% | 0.99x |
NopDeinit | 54797 | 55138 | +0.6% | 0.99x(?) |
StringBuilder | 2949 | 2970 | +0.7% | 0.99x(?) |
StringHasPrefixUnicode | 16511 | 16603 | +0.6% | 0.99x(?) |
ArrayValueProp4 | 2571 | 2604 | +1.3% | 0.99x(?) |
DictionaryBridge | 3706 | 3772 | +1.8% | 0.98x(?) |
ObjectiveCBridgeFromNSArrayAnyObjectForced | 7060 | 7191 | +1.9% | 0.98x |
DictionarySwap | 11026 | 11272 | +2.2% | 0.98x |
StringHasPrefix | 1462 | 1498 | +2.5% | 0.98x |
ObjectiveCBridgeToNSArray | 30999 | 31503 | +1.6% | 0.98x |
OpenClose | 453 | 463 | +2.2% | 0.98x(?) |
NSStringConversion | 2569 | 2613 | +1.7% | 0.98x(?) |
StackPromo | 163700 | 169348 | +3.5% | 0.97x(?) |
ObjectiveCBridgeFromNSDictionaryAnyObject | 198115 | 203286 | +2.6% | 0.97x(?) |
ArrayAppend | 2964 | 3068 | +3.5% | 0.97x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced | 130875 | 135157 | +3.3% | 0.97x(?) |
Phonebook | 120384 | 123692 | +2.8% | 0.97x |
ObjectiveCBridgeFromNSSetAnyObjectForced | 7440 | 7676 | +3.2% | 0.97x(?) |
ArrayAppendReserved | 2781 | 2863 | +3.0% | 0.97x |
ArraySubscript | 5905 | 6183 | +4.7% | 0.96x |
ObjectiveCBridgeFromNSDictionaryAnyObjectToString | 196217 | 205782 | +4.9% | 0.95x(?) |
ProtocolDispatch | 5651 | 5952 | +5.3% | 0.95x |
26d77d3
to
53d8ec5
Compare
@swift-ci Please test |
} | ||
|
||
public func _failEarlyRangeCheck(_ index: Int, bounds: Range<Int>) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment that says that this method is a no-op on purpose for performance reasons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Will do.
…indexing model. This is a manual specialization of index movement functions for a Strideable index that is required for Array performance. The optimizer is not capable of creating partial specializations yet. rdar://25946325
eea9659
to
4544cd1
Compare
@swift-ci Please test |
@gribozavr OK to merge? The failure on OS X seems to be unrelated to this change as far as I can see. |
@swiftix Should be OK to merge. |
[pull] swiftwasm from main
What's in this pull request?
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Note: Only members of the Apple organization can trigger swift-ci.
…indexing model.
This is a manual specialization of index movement functions for a Strideable index that is required for Array performance.
The optimizer is not capable of creating partial specializations yet.
rdar://25946325