Skip to content

revert _CocoaDictionaryBuffer indexing design #5680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2016

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Nov 8, 2016

The use of a lazy var crashes the swift module (de)serializer.

Resolves rdar://problem/29127264 (silmodule longtests tests crashing)
Possibly also fixes rdar://problem/29144445 (crasher in resilience tests due to privacy), haven't finished running everything locally.

The use of a lazy var crashes the swift module (de)serializer.
@Gankra
Copy link
Contributor Author

Gankra commented Nov 8, 2016

@swift-ci Please smoke test

@Gankra
Copy link
Contributor Author

Gankra commented Nov 8, 2016

@swift-ci Please benchmark

@Gankra
Copy link
Contributor Author

Gankra commented Nov 8, 2016

omfg I am going to destroy these reflection tests.

MERGE FASTER #5656

@Gankra
Copy link
Contributor Author

Gankra commented Nov 8, 2016

@swift-ci Please smoke test

@Gankra
Copy link
Contributor Author

Gankra commented Nov 8, 2016

Merging without checking the benchmarks since it's a reversion; just some data I'd like to have for future work.

@Gankra Gankra merged commit 7d038c4 into swiftlang:master Nov 8, 2016
@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2016

Build comment file:

Optimized (O)

Regression (7)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ByteSwap 0 1 +100000.0% 0.00x
SetExclusiveOr 2419 2898 +19.8% 0.83x
SetUnion 2114 2433 +15.1% 0.87x
StringHasPrefix 639 728 +13.9% 0.88x
CaptureProp 4064 4572 +12.5% 0.89x
ObjectiveCBridgeStubNSDateRefAccess 308 338 +9.7% 0.91x
OpenClose 51 54 +5.9% 0.94x

Improvement (3)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
PopFrontUnsafePointer 9669 9147 -5.4% 1.06x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 6495 5461 -15.9% 1.19x
ObjectiveCBridgeFromNSSetAnyObjectForced 5693 4743 -16.7% 1.20x

No Changes (137)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubToNSDate 13462 12882 -4.3% 1.05x(?)
StringHasPrefixUnicode 14396 13714 -4.7% 1.05x
PopFrontArrayGeneric 1160 1118 -3.6% 1.04x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 122253 118222 -3.3% 1.03x(?)
Calculator 35 34 -2.9% 1.03x
NSStringConversion 825 800 -3.0% 1.03x
ObjectiveCBridgeFromNSSetAnyObject 86991 85395 -1.8% 1.02x(?)
ObjectiveCBridgeStubDataAppend 3006 2934 -2.4% 1.02x(?)
SetExclusiveOr_OfObjects 7475 7295 -2.4% 1.02x(?)
SetUnion_OfObjects 6279 6166 -1.8% 1.02x(?)
ObjectiveCBridgeStubNSDateMutationRef 11959 11757 -1.7% 1.02x(?)
ObjectiveCBridgeStubFromArrayOfNSString 59757 58519 -2.1% 1.02x(?)
ObjectiveCBridgeStubFromNSDate 3590 3522 -1.9% 1.02x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 207477 204668 -1.4% 1.01x(?)
ObjectiveCBridgeStubFromNSDateRef 3702 3653 -1.3% 1.01x
StringWithCString 217132 215694 -0.7% 1.01x
ObjectiveCBridgeFromNSArrayAnyObjectForced 6323 6254 -1.1% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 179248 177904 -0.8% 1.01x(?)
SuperChars 214212 211210 -1.4% 1.01x(?)
ErrorHandling 2938 2914 -0.8% 1.01x(?)
StringHasSuffixUnicode 63273 62844 -0.7% 1.01x(?)
ProtocolDispatch2 159 158 -0.6% 1.01x
HashTest 1737 1728 -0.5% 1.01x(?)
StrComplexWalk 2916 2901 -0.5% 1.01x(?)
ArrayOfRef 3554 3517 -1.0% 1.01x(?)
DictionaryRemoveOfObjects 19580 19331 -1.3% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 132703 131074 -1.2% 1.01x(?)
Dictionary 739 729 -1.4% 1.01x
Phonebook 7587 7510 -1.0% 1.01x
ArrayOfPOD 183 182 -0.6% 1.01x
Chars 636 629 -1.1% 1.01x
StrToInt 5146 5075 -1.4% 1.01x
146 3179328 3163298 -0.5% 1.01x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 91260 90446 -0.9% 1.01x(?)
ArraySubscript 1434 1434 +0.0% 1.00x
ObjectiveCBridgeToNSString 1072 1067 -0.5% 1.00x(?)
DictionarySwapOfObjects 6303 6327 +0.4% 1.00x(?)
StackPromo 21680 21618 -0.3% 1.00x(?)
RecursiveOwnedParameter 1936 1937 +0.1% 1.00x(?)
Integrate 238 238 +0.0% 1.00x
ClassArrayGetter 12 12 +0.0% 1.00x
Array2D 2034 2034 +0.0% 1.00x
DictionaryBridge 3818 3803 -0.4% 1.00x(?)
MonteCarloPi 45017 44941 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2664 2664 +0.0% 1.00x
Prims 728 728 +0.0% 1.00x
SortLettersInPlace 972 972 +0.0% 1.00x
DictionarySwap 412 414 +0.5% 1.00x(?)
Dictionary3OfObjects 868 868 +0.0% 1.00x
RangeAssignment 288 289 +0.3% 1.00x(?)
ArrayAppendGenericStructs 1233 1231 -0.2% 1.00x(?)
ArrayAppendLazyMap 846 850 +0.5% 1.00x(?)
XorLoop 380 380 +0.0% 1.00x
ObserverClosure 1951 1960 +0.5% 1.00x(?)
ObjectiveCBridgeStubToNSString 1287 1290 +0.2% 1.00x(?)
ArrayAppendStrings 12121 12126 +0.0% 1.00x(?)
StaticArray 2763 2753 -0.4% 1.00x(?)
ProtocolDispatch 3040 3040 +0.0% 1.00x
TypeFlood 0 0 +0.0% 1.00x
Dictionary2 2014 2020 +0.3% 1.00x(?)
SetIntersect_OfObjects 1455 1451 -0.3% 1.00x(?)
Join 477 477 +0.0% 1.00x
ArrayAppend 775 775 +0.0% 1.00x
ArrayAppendOptionals 1234 1238 +0.3% 1.00x(?)
NSError 324 325 +0.3% 1.00x(?)
DictionaryOfObjects 2280 2279 -0.0% 1.00x(?)
ArrayAppendReserved 537 535 -0.4% 1.00x(?)
ObjectiveCBridgeStubDateMutation 273 273 +0.0% 1.00x
DictionaryLiteral 1267 1268 +0.1% 1.00x(?)
Hanoi 3464 3447 -0.5% 1.00x(?)
ArrayOfGenericPOD 220 220 +0.0% 1.00x
UTF8Decode 288 288 +0.0% 1.00x
SortStringsUnicode 8264 8297 +0.4% 1.00x(?)
ObjectiveCBridgeStubToArrayOfNSString 29074 28954 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 76518 76772 +0.3% 1.00x(?)
SetIntersect 355 356 +0.3% 1.00x(?)
NSDictionaryCastToSwift 5029 5051 +0.4% 1.00x(?)
RGBHistogramOfObjects 21600 21530 -0.3% 1.00x(?)
ArrayInClass 63 63 +0.0% 1.00x
ArrayOfGenericRef 3596 3589 -0.2% 1.00x(?)
ObjectiveCBridgeStubDateAccess 182 182 +0.0% 1.00x
Sim2DArray 277 277 +0.0% 1.00x
ArrayAppendRepeatCol 643 643 +0.0% 1.00x
ObjectiveCBridgeToNSDictionary 64451 64573 +0.2% 1.00x(?)
RC4 165 165 +0.0% 1.00x
Walsh 310 310 +0.0% 1.00x
ObjectiveCBridgeToNSSet 41312 41193 -0.3% 1.00x(?)
LinkedList 7232 7236 +0.1% 1.00x(?)
MapReduce 342 341 -0.3% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 104585 104139 -0.4% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 140783 141419 +0.5% 1.00x(?)
ArrayLiteral 1174 1179 +0.4% 1.00x(?)
ArrayAppendSequence 1063 1063 +0.0% 1.00x
ArrayAppendArrayOfInt 599 599 +0.0% 1.00x
ArrayValueProp2 6 6 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
AnyHashableWithAClass 63155 63191 +0.1% 1.00x(?)
SevenBoom 1356 1350 -0.4% 1.00x(?)
StringWalk 5901 5911 +0.2% 1.00x(?)
ArrayValueProp 6 6 +0.0% 1.00x
ObjectiveCBridgeFromNSString 1818 1817 -0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 235 235 +0.0% 1.00x
Dictionary2OfObjects 3428 3443 +0.4% 1.00x(?)
ArrayValueProp4 6 6 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2417 2413 -0.2% 1.00x(?)
ArrayValueProp3 6 6 +0.0% 1.00x
ObserverPartiallyAppliedMethod 3344 3353 +0.3% 1.00x(?)
Histogram 288 290 +0.7% 0.99x(?)
StringInterpolation 10903 10969 +0.6% 0.99x(?)
ObjectiveCBridgeStubFromNSString 769 778 +1.2% 0.99x(?)
ObjectAllocation 152 153 +0.7% 0.99x(?)
AngryPhonebook 2872 2910 +1.3% 0.99x(?)
Dictionary3 516 521 +1.0% 0.99x
ObjectiveCBridgeStubURLAppendPathRef 257420 260053 +1.0% 0.99x(?)
ObjectiveCBridgeToNSArray 30294 30505 +0.7% 0.99x(?)
ObjectiveCBridgeStubToNSDateRef 3256 3281 +0.8% 0.99x(?)
StringEqualPointerComparison 7303 7344 +0.6% 0.99x(?)
ObjectiveCBridgeStubToNSStringRef 116 117 +0.9% 0.99x(?)
StringHasSuffix 792 800 +1.0% 0.99x(?)
MonteCarloE 10426 10555 +1.2% 0.99x(?)
SetIsSubsetOf_OfObjects 304 307 +1.0% 0.99x
DictionaryRemove 2278 2311 +1.4% 0.99x(?)
RGBHistogram 2248 2261 +0.6% 0.99x(?)
ObserverForwarderStruct 885 895 +1.1% 0.99x(?)
TwoSum 1320 1327 +0.5% 0.99x(?)
PopFrontArray 1092 1114 +2.0% 0.98x(?)
SortStrings 1783 1826 +2.4% 0.98x
ObjectiveCBridgeStubFromNSStringRef 131 133 +1.5% 0.98x
ObserverUnappliedMethod 2371 2410 +1.6% 0.98x(?)
IterateData 2540 2597 +2.2% 0.98x
StringBuilder 1329 1350 +1.6% 0.98x(?)
DeadArray 182 185 +1.6% 0.98x
ObjectiveCBridgeStubURLAppendPath 255083 261626 +2.6% 0.97x(?)
SetIsSubsetOf 243 250 +2.9% 0.97x
NopDeinit 36643 37836 +3.3% 0.97x
PolymorphicCalls 21 22 +4.8% 0.95x
**Unoptimized (Onone)**

Regression (5)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubDateMutation 456 517 +13.4% 0.88x
RGBHistogram 36147 40309 +11.5% 0.90x
ArrayOfGenericPOD 3429 3780 +10.2% 0.91x
ArrayOfPOD 2329 2513 +7.9% 0.93x
RGBHistogramOfObjects 84221 89654 +6.5% 0.94x

Improvement (3)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
Calculator 1005 924 -8.1% 1.09x
ObjectiveCBridgeFromNSSetAnyObjectForced 8729 7681 -12.0% 1.14x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 9253 7844 -15.2% 1.18x

No Changes (139)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
BitCount 101 96 -5.0% 1.05x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 142990 137569 -3.8% 1.04x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 161184 154837 -3.9% 1.04x(?)
StringWalk 23279 22316 -4.1% 1.04x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 127652 124210 -2.7% 1.03x(?)
SortStrings 2773 2700 -2.6% 1.03x
ObjectiveCBridgeStubFromNSDateRef 4177 4075 -2.4% 1.03x
ObjectiveCBridgeStubDateAccess 1126 1095 -2.8% 1.03x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 118361 114949 -2.9% 1.03x(?)
ObjectiveCBridgeStubFromArrayOfNSString 60464 58892 -2.6% 1.03x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 10544 10349 -1.9% 1.02x(?)
TypeFlood 186 182 -2.1% 1.02x(?)
ObjectiveCBridgeToNSSet 42168 41409 -1.8% 1.02x(?)
ArrayAppendOptionals 1324 1304 -1.5% 1.02x(?)
ObjectiveCBridgeStubToArrayOfNSString 29771 29314 -1.5% 1.02x(?)
NSDictionaryCastToSwift 6323 6210 -1.8% 1.02x(?)
Phonebook 64237 62810 -2.2% 1.02x(?)
ObjectiveCBridgeStubNSDataAppend 2793 2751 -1.5% 1.02x(?)
ObjectiveCBridgeStubFromNSDate 3895 3805 -2.3% 1.02x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 218084 215712 -1.1% 1.01x(?)
DictionaryBridge 3904 3861 -1.1% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 188971 187933 -0.6% 1.01x(?)
Integrate 370 368 -0.5% 1.01x(?)
ErrorHandling 3812 3762 -1.3% 1.01x(?)
ObjectAllocation 559 551 -1.4% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObject 92828 91536 -1.4% 1.01x(?)
SetIntersect_OfObjects 11979 11853 -1.1% 1.01x
ObjectiveCBridgeStubToNSDateRef 3382 3357 -0.7% 1.01x(?)
AngryPhonebook 2987 2967 -0.7% 1.01x(?)
IterateData 10664 10548 -1.1% 1.01x
SetIsSubsetOf 2146 2115 -1.4% 1.01x
Dictionary 1858 1843 -0.8% 1.01x
SetIntersect 13274 13161 -0.8% 1.01x
ObjectiveCBridgeStubDataAppend 3376 3348 -0.8% 1.01x(?)
SetExclusiveOr_OfObjects 40355 40140 -0.5% 1.01x
ObjectiveCBridgeStubNSDateMutationRef 14469 14377 -0.6% 1.01x(?)
DictionaryRemove 17058 16950 -0.6% 1.01x(?)
StrToInt 5845 5781 -1.1% 1.01x
ArraySubscript 5622 5623 +0.0% 1.00x(?)
ObjectiveCBridgeToNSString 1104 1100 -0.4% 1.00x(?)
DictionarySwapOfObjects 19184 19241 +0.3% 1.00x(?)
RecursiveOwnedParameter 10912 10937 +0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1332 1337 +0.4% 1.00x(?)
ClassArrayGetter 1267 1266 -0.1% 1.00x(?)
Array2D 813168 813830 +0.1% 1.00x(?)
MonteCarloPi 53705 53699 -0.0% 1.00x(?)
StringWithCString 152741 152760 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 3078 3091 +0.4% 1.00x(?)
Prims 13232 13207 -0.2% 1.00x(?)
DictionarySwap 6044 6040 -0.1% 1.00x(?)
Dictionary3OfObjects 2004 1999 -0.2% 1.00x(?)
RangeAssignment 13309 13347 +0.3% 1.00x(?)
StringHasPrefix 1562 1557 -0.3% 1.00x
ByteSwap 9 9 +0.0% 1.00x
SuperChars 262891 262720 -0.1% 1.00x(?)
ArrayAppendLazyMap 245283 245081 -0.1% 1.00x(?)
ObjectiveCBridgeStubToNSDate 14012 14065 +0.4% 1.00x(?)
XorLoop 20003 20008 +0.0% 1.00x(?)
ArrayAppendReserved 3301 3302 +0.0% 1.00x(?)
StringInterpolation 15651 15683 +0.2% 1.00x(?)
ObserverClosure 6961 6965 +0.1% 1.00x(?)
ArrayAppendStrings 11835 11809 -0.2% 1.00x(?)
ObjectiveCBridgeStubFromNSString 822 823 +0.1% 1.00x(?)
ProtocolDispatch2 444 444 +0.0% 1.00x
HashTest 5260 5256 -0.1% 1.00x(?)
Dictionary3 1384 1381 -0.2% 1.00x(?)
Dictionary2 4043 4058 +0.4% 1.00x(?)
Join 1457 1457 +0.0% 1.00x
ArrayOfRef 9109 9122 +0.1% 1.00x(?)
ObserverUnappliedMethod 8670 8658 -0.1% 1.00x(?)
ObjectiveCBridgeToNSArray 30765 30862 +0.3% 1.00x(?)
DictionaryOfObjects 4543 4541 -0.0% 1.00x(?)
PopFrontArrayGeneric 9711 9687 -0.2% 1.00x(?)
PopFrontUnsafePointer 242821 242643 -0.1% 1.00x(?)
StringEqualPointerComparison 9617 9627 +0.1% 1.00x(?)
PolymorphicCalls 1130 1130 +0.0% 1.00x
RC4 9408 9383 -0.3% 1.00x(?)
ObjectiveCBridgeStubToNSStringRef 155 155 +0.0% 1.00x
MapReduce 45291 45372 +0.2% 1.00x(?)
DictionaryLiteral 15682 15706 +0.1% 1.00x(?)
DictionaryRemoveOfObjects 46498 46589 +0.2% 1.00x(?)
UTF8Decode 43543 43517 -0.1% 1.00x(?)
SortStringsUnicode 9303 9264 -0.4% 1.00x
NopDeinit 58083 58062 -0.0% 1.00x(?)
SetExclusiveOr 23733 23691 -0.2% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 1230 1233 +0.2% 1.00x(?)
StringBuilder 2717 2718 +0.0% 1.00x(?)
ArrayInClass 3958 3957 -0.0% 1.00x(?)
ArrayOfGenericRef 10041 10034 -0.1% 1.00x(?)
Sim2DArray 14784 14778 -0.0% 1.00x(?)
MonteCarloE 108747 108697 -0.1% 1.00x(?)
SetUnion_OfObjects 28156 28122 -0.1% 1.00x(?)
Walsh 13329 13273 -0.4% 1.00x(?)
SetIsSubsetOf_OfObjects 1912 1909 -0.2% 1.00x(?)
ArrayAppend 3555 3554 -0.0% 1.00x(?)
LinkedList 27541 27535 -0.0% 1.00x(?)
NSStringConversion 2993 2979 -0.5% 1.00x(?)
ArrayAppendArrayOfInt 640 640 +0.0% 1.00x
Chars 5003 4981 -0.4% 1.00x(?)
ObserverForwarderStruct 5218 5205 -0.2% 1.00x(?)
146 6039204 6052201 +0.2% 1.00x
ArrayLiteral 1250 1248 -0.2% 1.00x(?)
SevenBoom 1497 1495 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 92443 92890 +0.5% 1.00x(?)
ArrayValueProp 2675 2683 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSString 5144 5161 +0.3% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 20953 20963 +0.1% 1.00x(?)
Dictionary2OfObjects 5901 5928 +0.5% 1.00x(?)
ArrayValueProp4 3020 3023 +0.1% 1.00x(?)
TwoSum 4957 4939 -0.4% 1.00x(?)
ArrayValueProp3 3076 3084 +0.3% 1.00x
StackPromo 128565 130518 +1.5% 0.99x(?)
PopFrontArray 24412 24770 +1.5% 0.99x(?)
SortLettersInPlace 2566 2581 +0.6% 0.99x(?)
ArrayAppendGenericStructs 1297 1305 +0.6% 0.99x(?)
ObjectiveCBridgeStubFromNSStringRef 162 164 +1.2% 0.99x
AnyHashableWithAClass 77108 77677 +0.7% 0.99x
CaptureProp 116714 118059 +1.1% 0.99x
Hanoi 19534 19633 +0.5% 0.99x(?)
OpenClose 434 439 +1.1% 0.99x(?)
ObjectiveCBridgeStubURLAppendPath 259902 263403 +1.4% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObject 78184 78618 +0.6% 0.99x(?)
ArrayAppendRepeatCol 212243 214096 +0.9% 0.99x(?)
ObjectiveCBridgeToNSDictionary 64693 65175 +0.8% 0.99x(?)
StringHasSuffixUnicode 64795 65330 +0.8% 0.99x
StringHasPrefixUnicode 15310 15465 +1.0% 0.99x
SetUnion 12074 12195 +1.0% 0.99x
DeadArray 120536 122070 +1.3% 0.99x(?)
ArrayValueProp2 3156 3173 +0.5% 0.99x(?)
ObserverPartiallyAppliedMethod 8288 8338 +0.6% 0.99x
Histogram 9797 10032 +2.4% 0.98x(?)
StaticArray 34542 35180 +1.9% 0.98x(?)
ProtocolDispatch 5474 5592 +2.2% 0.98x
ObjectiveCBridgeStubURLAppendPathRef 259317 263823 +1.7% 0.98x(?)
NSError 670 692 +3.3% 0.97x(?)
StringHasSuffix 1564 1615 +3.3% 0.97x
ArrayAppendSequence 103560 106281 +2.6% 0.97x
StrComplexWalk 7637 8059 +5.5% 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

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.

2 participants