Skip to content

[WIP][stdlib] Finalize Hasher ABI #19685

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

Closed
wants to merge 4 commits into from

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Oct 3, 2018

This PR will finalize the ABI of Hasher. It looks like we may need to keep Hasher fixed-layout, with some extra padding to allow for potential future changes.

However, we should experiment with a few more ideas before committing to do that.

First, let's try making the tail buffer inlinable.

@lorentey
Copy link
Member Author

lorentey commented Oct 3, 2018

@swift-ci smoke benchmark

The optimizer dislikes nested switch statements; flatten them out to simplify optimization and to hopefully speed things up a little.
@swift-ci
Copy link
Contributor

swift-ci commented Oct 3, 2018

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
SetIsSubsetBox25 180 454 +152.2% 0.40x
SetIntersectionBox0 151 317 +109.9% 0.48x
SetIsSubsetBox0 357 653 +82.9% 0.55x
SetIntersectionBox25 286 501 +75.2% 0.57x
SetSubtractingBox0 156 247 +58.3% 0.63x
SetSymmetricDifferenceBox25 536 840 +56.7% 0.64x
SetExclusiveOr_OfObjects 7324 11133 +52.0% 0.66x
SetSymmetricDifferenceBox0 734 1114 +51.8% 0.66x
SetSubtractingBox25 274 385 +40.5% 0.71x
SetUnionBox0 587 806 +37.3% 0.73x
SetUnion_OfObjects 5860 8036 +37.1% 0.73x
SetIsSubsetInt50 152 207 +36.2% 0.73x
Dictionary4OfObjects 347 460 +32.6% 0.75x
DictionaryGroup 220 286 +30.0% 0.77x
SetUnionInt100 70 91 +30.0% 0.77x
SetUnionBox25 372 483 +29.8% 0.77x
PrimsSplit 787 1016 +29.1% 0.77x
SetIsSubsetInt100 308 397 +28.9% 0.78x
Dictionary3OfObjects 559 716 +28.1% 0.78x
DictionarySwapOfObjects 8020 10240 +27.7% 0.78x
FrequenciesUsingReduceInto 1184 1495 +26.3% 0.79x
SetSubtractingInt0 73 92 +26.0% 0.79x
Prims 788 992 +25.9% 0.79x
SetSubtractingInt25 113 142 +25.7% 0.80x
Dictionary4 281 353 +25.6% 0.80x
StringRemoveDupes 417 517 +24.0% 0.81x
SetIntersectionInt0 68 84 +23.5% 0.81x
StringHashing_ascii 34 42 +23.5% 0.81x
SetIntersect 689 841 +22.1% 0.82x
DictionarySwap 1104 1343 +21.6% 0.82x
DictionaryRemoveOfObjects 20775 25144 +21.0% 0.83x
SetIntersectionInt25 157 190 +21.0% 0.83x
SetSymmetricDifferenceInt100 252 304 +20.6% 0.83x
SetIntersectionInt50 237 285 +20.3% 0.83x
Dictionary3 173 208 +20.2% 0.83x
SetSymmetricDifferenceInt25 250 299 +19.6% 0.84x
SetSubtractingInt100 183 218 +19.1% 0.84x
Dictionary 401 475 +18.5% 0.84x
SetSubtractingInt50 152 180 +18.4% 0.84x
Histogram 590 695 +17.8% 0.85x
Dictionary4Legacy 664 782 +17.8% 0.85x
SetIntersectionInt100 394 464 +17.8% 0.85x
SetSymmetricDifferenceInt50 264 308 +16.7% 0.86x
SetSymmetricDifferenceInt0 391 456 +16.6% 0.86x
SetExclusiveOr 3903 4551 +16.6% 0.86x
Dictionary4OfObjectsLegacy 771 899 +16.6% 0.86x
SetUnion 3247 3777 +16.3% 0.86x
SetUnionInt0 324 376 +16.0% 0.86x
WordCountUniqueASCII 1502 1739 +15.8% 0.86x
DictionaryCompactMapValuesOfNilValue 5123 5927 +15.7% 0.86x
SetUnionInt50 124 143 +15.3% 0.87x
RGBHistogram 2277 2592 +13.8% 0.88x
RGBHistogramOfObjects 18089 20574 +13.7% 0.88x
CountAlgoString 3364 3820 +13.6% 0.88x
SetUnionInt25 149 169 +13.4% 0.88x
TwoSum 1239 1401 +13.1% 0.88x
DictionarySwapAt 1133 1277 +12.7% 0.89x
DictionarySubscriptDefaultMutation 359 404 +12.5% 0.89x
DictionaryFilter 60164 67636 +12.4% 0.89x
Dictionary2 617 693 +12.3% 0.89x
DictionaryCopy 75538 82896 +9.7% 0.91x
Improvement
AnyHashableWithAClass 115351 88843 -23.0% 1.30x
IterateData 1762 1615 -8.3% 1.09x (?)

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
ErrorHandling.o 2758 3589 +30.1% 0.77x
OpenClose.o 3890 4721 +21.4% 0.82x
AnyHashableWithAClass.o 3717 4285 +15.3% 0.87x
DictTest4.o 24908 28620 +14.9% 0.87x
DictTest4Legacy.o 26218 29890 +14.0% 0.88x
DictionarySwap.o 29854 33942 +13.7% 0.88x
DictionarySubscriptDefault.o 31163 35299 +13.3% 0.88x
TestsUtils.o 23957 26013 +8.6% 0.92x
DictTest2.o 20320 21960 +8.1% 0.93x
DictTest3.o 28528 30488 +6.9% 0.94x
DictionaryGroup.o 17751 18895 +6.4% 0.94x
StringRemoveDupes.o 15909 16933 +6.4% 0.94x
Prims.o 43745 46257 +5.7% 0.95x
StringEnum.o 14459 15284 +5.7% 0.95x
PrimsSplit.o 43793 46233 +5.6% 0.95x
ReduceInto.o 24399 25695 +5.3% 0.95x
CountAlgo.o 21172 22261 +5.1% 0.95x
DictionaryRemove.o 17006 17862 +5.0% 0.95x
SetTests.o 59697 62265 +4.3% 0.96x
WordCount.o 65279 67287 +3.1% 0.97x
DictTest.o 51887 53431 +3.0% 0.97x
RGBHistogram.o 26605 27237 +2.4% 0.98x
BinaryFloatingPointConversionFromBinaryInteger.o 11477 11677 +1.7% 0.98x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Regression
SetIsSubsetBox25 182 414 +127.5% 0.44x
SetIntersectionBox0 146 325 +122.6% 0.45x
SetIntersectionBox25 283 525 +85.5% 0.54x
SetSubtractingBox0 152 258 +69.7% 0.59x
SetSymmetricDifferenceBox25 552 871 +57.8% 0.63x
SetSymmetricDifferenceBox0 745 1152 +54.6% 0.65x
SetExclusiveOr_OfObjects 7458 11510 +54.3% 0.65x
SetSubtractingBox25 284 411 +44.7% 0.69x
SetIsSubsetBox0 422 599 +41.9% 0.70x
SetUnion_OfObjects 5924 8348 +40.9% 0.71x
SetUnionBox0 594 834 +40.4% 0.71x
Dictionary4OfObjects 360 500 +38.9% 0.72x
SetIsSubsetInt50 156 215 +37.8% 0.73x
SetIntersect 626 861 +37.5% 0.73x
SetIntersectionInt0 63 86 +36.5% 0.73x
SetSubtractingInt0 71 96 +35.2% 0.74x
SetIsSubsetInt100 312 421 +34.9% 0.74x
SetIsSubsetInt25 78 105 +34.6% 0.74x
SetUnionBox25 375 501 +33.6% 0.75x
SetUnionInt100 70 93 +32.9% 0.75x
Dictionary4 280 362 +29.3% 0.77x
DictionarySwap 1099 1417 +28.9% 0.78x
SetIntersectionInt25 152 194 +27.6% 0.78x
DictionarySwapOfObjects 8324 10556 +26.8% 0.79x
SetIntersectionInt50 229 287 +25.3% 0.80x
SetSubtractingInt25 111 139 +25.2% 0.80x
SetSubtractingInt50 149 184 +23.5% 0.81x
PrimsSplit 870 1072 +23.2% 0.81x
DictionaryRemoveOfObjects 21291 26060 +22.4% 0.82x
Prims 875 1070 +22.3% 0.82x
SetUnionInt50 116 140 +20.7% 0.83x
SetIntersectionInt100 392 473 +20.7% 0.83x
StringHashing_ascii 34 41 +20.6% 0.83x
Dictionary4Legacy 652 783 +20.1% 0.83x
FrequenciesUsingReduceInto 1196 1435 +20.0% 0.83x
DictionaryCompactMapValuesOfNilValue 5634 6743 +19.7% 0.84x
SetUnionInt0 316 377 +19.3% 0.84x
StringRemoveDupes 428 510 +19.2% 0.84x
SetSymmetricDifferenceInt25 231 275 +19.0% 0.84x
Dictionary3 179 213 +19.0% 0.84x
SetUnion 3167 3766 +18.9% 0.84x
SetSymmetricDifferenceInt50 244 290 +18.9% 0.84x
SetUnionInt25 139 165 +18.7% 0.84x
SetSymmetricDifferenceInt100 243 287 +18.1% 0.85x
Dictionary 417 491 +17.7% 0.85x
CountAlgoString 3225 3797 +17.7% 0.85x
WordCountUniqueASCII 1581 1858 +17.5% 0.85x
DictionaryCopy 75831 87136 +14.9% 0.87x
DictionarySwapAtOfObjects 7976 9130 +14.5% 0.87x
DictionaryGroup 316 360 +13.9% 0.88x
SetSymmetricDifferenceInt0 384 435 +13.3% 0.88x
Dictionary4OfObjectsLegacy 810 917 +13.2% 0.88x
RGBHistogram 2402 2677 +11.4% 0.90x
SetExclusiveOr 3879 4316 +11.3% 0.90x
Dictionary2 646 706 +9.3% 0.92x
Improvement
AnyHashableWithAClass 133123 110409 -17.1% 1.21x
IterateData 1799 1577 -12.3% 1.14x (?)

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
ErrorHandling.o 3062 3781 +23.5% 0.81x
OpenClose.o 3747 4467 +19.2% 0.84x
DictTest4Legacy.o 22633 26873 +18.7% 0.84x
ReduceInto.o 16746 19675 +17.5% 0.85x
DictTest4.o 20939 24155 +15.4% 0.87x
DictionarySubscriptDefault.o 27347 30291 +10.8% 0.90x
TestsUtils.o 19357 21085 +8.9% 0.92x
DictionarySwap.o 26771 28947 +8.1% 0.92x
AnyHashableWithAClass.o 3965 4277 +7.9% 0.93x
StringRemoveDupes.o 9037 9741 +7.8% 0.93x
CountAlgo.o 14432 15536 +7.6% 0.93x
Prims.o 38541 41349 +7.3% 0.93x
PrimsSplit.o 38589 41397 +7.3% 0.93x
DictionaryGroup.o 16327 17367 +6.4% 0.94x
StringEnum.o 13674 14396 +5.3% 0.95x
DictionaryRemove.o 14827 15531 +4.7% 0.95x
WordCount.o 54720 56776 +3.8% 0.96x
SetTests.o 52825 54633 +3.4% 0.97x
RGBHistogram.o 23949 24557 +2.5% 0.98x
BinaryFloatingPointConversionFromBinaryInteger.o 11349 11549 +1.8% 0.98x
DictTest3.o 23106 23498 +1.7% 0.98x
DictTest2.o 16498 16762 +1.6% 0.98x
DriverUtils.o 146129 147649 +1.0% 0.99x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
FloatingPointPrinting_Double_description_uniform 36047 44669 +23.9% 0.81x
SetExclusiveOr 10028 12250 +22.2% 0.82x
SetUnionInt0 800 959 +19.9% 0.83x
SetUnion 8014 9600 +19.8% 0.83x
SetSymmetricDifferenceInt0 1025 1224 +19.4% 0.84x
SetIntersectionInt0 217 253 +16.6% 0.86x
SetIntersect 2175 2534 +16.5% 0.86x
SetIntersectionInt25 400 464 +16.0% 0.86x
FloatingPointPrinting_Float80_description_uniform 64610 74355 +15.1% 0.87x
SetIntersectionInt100 874 1001 +14.5% 0.87x
SetSymmetricDifferenceInt25 747 850 +13.8% 0.88x
SetIntersectionInt50 575 649 +12.9% 0.89x
SetSymmetricDifferenceInt50 752 829 +10.2% 0.91x
Dictionary4Legacy 1174 1285 +9.5% 0.91x (?)
DictionaryFilter 206209 225176 +9.2% 0.92x
CharIteration_russian_unicodeScalars_Backwards 223327 241079 +7.9% 0.93x
Improvement
ObjectiveCBridgeStubToNSDate2 1597 1443 -9.6% 1.11x (?)

Code size: Swift libraries

TEST OLD NEW DELTA RATIO
Regression
libswiftDarwin.dylib 32768 36864 +12.5% 0.89x
libswiftSwiftReflectionTest.dylib 49152 53248 +8.3% 0.92x
libswiftDispatch.dylib 114688 118784 +3.6% 0.97x
libswiftNetwork.dylib 172032 176128 +2.4% 0.98x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@lorentey
Copy link
Member Author

lorentey commented Oct 3, 2018

Results seem to be roughly in line with #18953, or even worse. Making the tail inlinable may not actually be an optimization.

@lorentey
Copy link
Member Author

lorentey commented Oct 3, 2018

Next up, let's start using _BridgeStorage.

@lorentey
Copy link
Member Author

lorentey commented Oct 3, 2018

@swift-ci please smoke benchmark

@lorentey
Copy link
Member Author

lorentey commented Oct 3, 2018

I spawned #19688 to test the _BridgeStorage changes on their own, in isolation.

@swift-ci
Copy link
Contributor

swift-ci commented Oct 3, 2018

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
DictionarySwapAtOfObjects 7515 48692 +547.9% 0.15x
DictionarySwapAt 1123 5805 +416.9% 0.19x
SetIntersectionBox0 146 263 +80.1% 0.56x
SetIsSubsetBox25 179 317 +77.1% 0.56x
SetSubtractingBox0 158 266 +68.4% 0.59x
SetIntersectionBox25 285 475 +66.7% 0.60x
SetExclusiveOr_OfObjects 7380 11163 +51.3% 0.66x
SetSymmetricDifferenceBox0 749 1113 +48.6% 0.67x
SetIsSubsetInt50 149 221 +48.3% 0.67x
SetSymmetricDifferenceBox25 566 827 +46.1% 0.68x
SetSubtractingBox25 283 412 +45.6% 0.69x
SetIntersect 680 986 +45.0% 0.69x
SetIntersectionInt0 68 98 +44.1% 0.69x
SetIsSubsetInt25 76 109 +43.4% 0.70x
SetIsSubsetBox0 358 507 +41.6% 0.71x
SetUnionBox0 598 834 +39.5% 0.72x
SetUnion_OfObjects 6008 8352 +39.0% 0.72x
SetSubtractingInt0 70 95 +35.7% 0.74x
SetUnionBox25 382 513 +34.3% 0.74x
SetIsSubsetInt100 315 422 +34.0% 0.75x
DictionaryGroup 214 286 +33.6% 0.75x
SetIntersectionInt50 238 314 +31.9% 0.76x
SetIntersectionInt25 160 209 +30.6% 0.77x
SetUnionInt50 125 162 +29.6% 0.77x
DictionaryRemove 4230 5439 +28.6% 0.78x
SetIntersectionInt100 389 497 +27.8% 0.78x
SetUnionInt25 150 190 +26.7% 0.79x
SetUnionInt100 72 91 +26.4% 0.79x
SetSubtractingInt25 118 149 +26.3% 0.79x
Dictionary4OfObjects 346 427 +23.4% 0.81x
SetUnionInt0 325 399 +22.8% 0.81x
SetSymmetricDifferenceInt0 395 484 +22.5% 0.82x
FrequenciesUsingReduceInto 1197 1465 +22.4% 0.82x
Prims 778 950 +22.1% 0.82x
SetUnion 3279 4000 +22.0% 0.82x
SetSubtractingInt50 161 195 +21.1% 0.83x
SetExclusiveOr 3977 4807 +20.9% 0.83x
DictionaryRemoveOfObjects 20626 24913 +20.8% 0.83x
StringHashing_ascii 34 41 +20.6% 0.83x
SetSymmetricDifferenceInt50 272 327 +20.2% 0.83x
SetSubtractingInt100 193 231 +19.7% 0.84x
PrimsSplit 787 941 +19.6% 0.84x
SetSymmetricDifferenceInt25 263 311 +18.3% 0.85x
Dictionary3OfObjects 562 662 +17.8% 0.85x
StringRemoveDupes 429 500 +16.6% 0.86x
SetSymmetricDifferenceInt100 262 305 +16.4% 0.86x
CharacterPropertiesPrecomputed 991 1150 +16.0% 0.86x
Dictionary4Legacy 653 747 +14.4% 0.87x
Dictionary4 280 320 +14.3% 0.88x
DictionaryCompactMapValuesOfNilValue 5121 5764 +12.6% 0.89x
SetIsSubsetInt0 253 283 +11.9% 0.89x
DictionaryBridgeToObjC_Bridge 19 21 +10.5% 0.90x
RGBHistogramOfObjects 18064 19957 +10.5% 0.91x
Dictionary4OfObjectsLegacy 785 867 +10.4% 0.91x
DictionaryLiteral 2147 2350 +9.5% 0.91x
Dictionary 402 440 +9.5% 0.91x
DictionaryCompactMapValuesOfCastValue 11335 12283 +8.4% 0.92x
IterateData 1767 1907 +7.9% 0.93x (?)
Improvement
AnyHashableWithAClass 125208 88909 -29.0% 1.41x
DictionaryCopy 73900 60608 -18.0% 1.22x
DictionarySubscriptDefaultMutation 345 294 -14.8% 1.17x
DictionarySubscriptDefaultMutationArray 736 643 -12.6% 1.14x
DictionaryFilter 59094 52421 -11.3% 1.13x
StringComparison_latin1 699 641 -8.3% 1.09x

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
ErrorHandling.o 2758 3589 +30.1% 0.77x
OpenClose.o 3890 4721 +21.4% 0.82x
DictTest4.o 24908 29900 +20.0% 0.83x
DictTest4Legacy.o 26218 31202 +19.0% 0.84x
DictionarySubscriptDefault.o 31163 35987 +15.5% 0.87x
AnyHashableWithAClass.o 3717 4285 +15.3% 0.87x
TestsUtils.o 23957 27517 +14.9% 0.87x
DictionarySwap.o 29854 34146 +14.4% 0.87x
DictionaryRemove.o 17006 19266 +13.3% 0.88x
DictTest3.o 28528 32112 +12.6% 0.89x
DictTest2.o 20320 22756 +12.0% 0.89x
Prims.o 43745 47297 +8.1% 0.92x
PrimsSplit.o 43793 47273 +7.9% 0.93x
DictionaryGroup.o 17751 19071 +7.4% 0.93x
RGBHistogram.o 26605 28549 +7.3% 0.93x
WordCount.o 65279 69448 +6.4% 0.94x
StringEnum.o 14459 15284 +5.7% 0.95x
StringRemoveDupes.o 15909 16805 +5.6% 0.95x
ReduceInto.o 24399 25711 +5.4% 0.95x
SetTests.o 59697 62897 +5.4% 0.95x
CountAlgo.o 21172 22229 +5.0% 0.95x
DictTest.o 51887 54131 +4.3% 0.96x
BinaryFloatingPointConversionFromBinaryInteger.o 11477 11677 +1.7% 0.98x
DriverUtils.o 167649 170529 +1.7% 0.98x
Improvement
DictionaryLiteral.o 1392 1344 -3.4% 1.04x
NSDictionaryCastToSwift.o 2065 2000 -3.1% 1.03x
Histogram.o 4604 4476 -2.8% 1.03x
HashQuadratic.o 6328 6200 -2.0% 1.02x
DictionaryCopy.o 9992 9794 -2.0% 1.02x
DictionaryBridge.o 3715 3650 -1.7% 1.02x
DictionaryBridgeToObjC.o 7199 7119 -1.1% 1.01x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Regression
DictionarySwapAtOfObjects 8074 49059 +507.6% 0.16x
DictionarySwapAt 1111 5007 +350.7% 0.22x
SetIsSubsetBox25 184 344 +87.0% 0.53x
SetIntersectionBox0 148 270 +82.4% 0.55x
SetSubtractingBox0 154 267 +73.4% 0.58x
SetIntersectionBox25 286 489 +71.0% 0.58x
SetSymmetricDifferenceBox25 549 881 +60.5% 0.62x
SetExclusiveOr_OfObjects 7461 11528 +54.5% 0.65x
SetSymmetricDifferenceBox0 746 1151 +54.3% 0.65x
SetSubtractingBox25 278 425 +52.9% 0.65x
SetIsSubsetBox0 357 544 +52.4% 0.66x
SetIntersect 612 919 +50.2% 0.67x
SetIntersectionInt0 61 91 +49.2% 0.67x
SetUnion_OfObjects 5937 8750 +47.4% 0.68x
SetUnionBox0 593 873 +47.2% 0.68x
SetIsSubsetInt50 155 226 +45.8% 0.69x
SetIsSubsetInt25 78 111 +42.3% 0.70x
SetUnionBox25 376 533 +41.8% 0.71x
SetIsSubsetInt100 307 423 +37.8% 0.73x
SetSymmetricDifferenceInt25 230 316 +37.4% 0.73x
SetSubtractingInt25 113 155 +37.2% 0.73x
WordCountUniqueASCII 1581 2162 +36.7% 0.73x
SetSubtractingInt50 151 206 +36.4% 0.73x
SetUnionInt100 70 95 +35.7% 0.74x
SetIntersectionInt25 152 202 +32.9% 0.75x
SetSubtractingInt0 74 98 +32.4% 0.76x
SetSymmetricDifferenceInt50 250 331 +32.4% 0.76x
SetIntersectionInt50 231 304 +31.6% 0.76x
SetIntersectionInt100 388 503 +29.6% 0.77x
Dictionary4OfObjects 364 468 +28.6% 0.78x
SetUnionInt50 119 152 +27.7% 0.78x
SetUnion 3139 3938 +25.5% 0.80x
SetSymmetricDifferenceInt100 243 304 +25.1% 0.80x
FrequenciesUsingReduceInto 1212 1515 +25.0% 0.80x
StringHashing_ascii 33 41 +24.2% 0.80x
SetSymmetricDifferenceInt0 386 478 +23.8% 0.81x
SetExclusiveOr 3865 4761 +23.2% 0.81x
PrimsSplit 867 1065 +22.8% 0.81x
SetUnionInt0 321 394 +22.7% 0.81x
Prims 868 1061 +22.2% 0.82x
SetUnionInt25 144 176 +22.2% 0.82x
DictionaryGroup 316 380 +20.3% 0.83x
DictionaryRemoveOfObjects 21600 25743 +19.2% 0.84x
SetSubtractingInt100 195 229 +17.4% 0.85x
Dictionary4Legacy 651 759 +16.6% 0.86x
DictionarySwapOfObjects 8305 9657 +16.3% 0.86x
StringRemoveDupes 428 496 +15.9% 0.86x
Dictionary4 281 323 +14.9% 0.87x
SetIsSubsetInt0 257 295 +14.8% 0.87x
Dictionary4OfObjectsLegacy 787 892 +13.3% 0.88x
DictionaryCompactMapValuesOfNilValue 5724 6475 +13.1% 0.88x
DictionaryRemove 4721 5323 +12.8% 0.89x
TwoSum 1243 1394 +12.1% 0.89x
DictionaryLiteral 2761 3045 +10.3% 0.91x
CharacterPropertiesPrecomputed 1510 1661 +10.0% 0.91x (?)
RGBHistogramOfObjects 19170 20670 +7.8% 0.93x
CStringLongAscii 3306 3562 +7.7% 0.93x
Improvement
DictionaryCopy 76052 64332 -15.4% 1.18x
DictionarySubscriptDefaultMutationArray 757 657 -13.2% 1.15x
FloatingPointPrinting_Float_description_uniform 5803 5178 -10.8% 1.12x

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
ErrorHandling.o 3062 3781 +23.5% 0.81x
DictTest4Legacy.o 22633 27401 +21.1% 0.83x
OpenClose.o 3747 4467 +19.2% 0.84x
DictTest4.o 20939 24907 +19.0% 0.84x
ReduceInto.o 16746 19707 +17.7% 0.85x
DictionarySubscriptDefault.o 27347 30619 +12.0% 0.89x
DictionaryRemove.o 14827 16443 +10.9% 0.90x
DictionarySwap.o 26771 29579 +10.5% 0.91x
TestsUtils.o 19357 21261 +9.8% 0.91x
CountAlgo.o 14432 15680 +8.6% 0.92x
DictTest2.o 16498 17898 +8.5% 0.92x
WordCount.o 54720 59048 +7.9% 0.93x
AnyHashableWithAClass.o 3965 4277 +7.9% 0.93x
Prims.o 38541 41397 +7.4% 0.93x
PrimsSplit.o 38589 41445 +7.4% 0.93x
StringRemoveDupes.o 9037 9661 +6.9% 0.94x
DictTest3.o 23106 24554 +6.3% 0.94x
DictionaryGroup.o 16327 17303 +6.0% 0.94x
StringEnum.o 13674 14396 +5.3% 0.95x
SetTests.o 52825 55473 +5.0% 0.95x
RGBHistogram.o 23949 24989 +4.3% 0.96x
main.o 41785 43561 +4.3% 0.96x
DictTest.o 49097 50409 +2.7% 0.97x
BinaryFloatingPointConversionFromBinaryInteger.o 11349 11549 +1.8% 0.98x
StringEdits.o 14174 14334 +1.1% 0.99x
Improvement
NSError.o 1763 1683 -4.5% 1.05x
SevenBoom.o 2111 2019 -4.4% 1.05x
Histogram.o 4480 4352 -2.9% 1.03x
NSDictionaryCastToSwift.o 1941 1893 -2.5% 1.03x
DictionaryBridge.o 3751 3671 -2.1% 1.02x
DictionaryLiteral.o 1525 1493 -2.1% 1.02x
HashQuadratic.o 5832 5720 -1.9% 1.02x
DictionaryCopy.o 9105 8969 -1.5% 1.02x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
DictionarySwapAt 3706 23318 +529.2% 0.16x
DictionarySwapAtOfObjects 16221 97031 +498.2% 0.17x
FloatingPointPrinting_Double_interpolated 91571 112670 +23.0% 0.81x
SetUnion 7928 9150 +15.4% 0.87x
SetSubtractingInt100 556 637 +14.6% 0.87x
SetSubtractingInt50 488 556 +13.9% 0.88x
SetIntersectionInt100 865 980 +13.3% 0.88x
SetUnionInt50 469 521 +11.1% 0.90x
SetSymmetricDifferenceInt100 719 793 +10.3% 0.91x
ArrayOfPOD 782 860 +10.0% 0.91x (?)
SetUnionInt0 832 914 +9.9% 0.91x
DictionaryFilter 207043 226885 +9.6% 0.91x
SetUnionInt100 328 359 +9.5% 0.91x
SetIntersectionInt25 412 450 +9.2% 0.92x
SetIntersectionInt50 573 623 +8.7% 0.92x
CaptureProp 330292 355380 +7.6% 0.93x

Code size: Swift libraries

TEST OLD NEW DELTA RATIO
Regression
libswiftDarwin.dylib 32768 36864 +12.5% 0.89x
libswiftSwiftReflectionTest.dylib 49152 53248 +8.3% 0.92x
libswiftDispatch.dylib 114688 118784 +3.6% 0.97x
libswiftNetwork.dylib 172032 176128 +2.4% 0.98x
libswiftFoundation.dylib 1851392 1875968 +1.3% 0.99x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@lorentey
Copy link
Member Author

lorentey commented Nov 1, 2018

Closing; this work is being completed in #20185 and #20202.

@lorentey lorentey closed this Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants