Skip to content

stdlib: Make ArrayBufferProtocol.init inlinable to facilitate specialization #20763

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

Conversation

aschwaighofer
Copy link
Contributor

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please benchmark

@airspeedswift airspeedswift requested a review from lancep November 26, 2018 19:13
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please smoke test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please benchmark

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swift-ci
Copy link
Contributor

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
CharacterLiteralsLarge 97 108 +11.3% 0.90x
SuffixSequence 520 568 +9.2% 0.92x
SuffixSequenceLazy 521 567 +8.8% 0.92x
Improvement
COWArrayGuaranteedParameterOverhead 10672 3858 -63.8% 2.77x
Sim2DArray 399 312 -21.8% 1.28x

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
ArraySetElement.o 1031 1119 +8.5% 0.92x
Sim2DArray.o 1278 1354 +5.9% 0.94x
ArrayInClass.o 1613 1685 +4.5% 0.96x
COWArrayGuaranteedParameterOverhead.o 1175 1227 +4.4% 0.96x
Memset.o 2084 2148 +3.1% 0.97x
XorLoop.o 1969 2028 +3.0% 0.97x
MonteCarloE.o 3324 3396 +2.2% 0.98x
Array2D.o 4232 4303 +1.7% 0.98x
ReversedCollections.o 11147 11275 +1.1% 0.99x
Improvement
Hash.o 39058 33833 -13.4% 1.15x
RC4.o 4715 4115 -12.7% 1.15x
RemoveWhere.o 26375 23463 -11.0% 1.12x
Walsh.o 9148 8436 -7.8% 1.08x
Prims.o 42913 40201 -6.3% 1.07x
PrimsSplit.o 42965 40253 -6.3% 1.07x
RandomShuffle.o 3381 3291 -2.7% 1.03x
DropLast.o 26467 25947 -2.0% 1.02x
Suffix.o 26361 25889 -1.8% 1.02x
SortStrings.o 27936 27544 -1.4% 1.01x
ArraySubscript.o 4028 3972 -1.4% 1.01x
RGBHistogram.o 27588 27292 -1.1% 1.01x
CSVParsing.o 31881 31545 -1.1% 1.01x
Phonebook.o 11660 11544 -1.0% 1.01x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Regression
DropLastCountableRangeLazy 11 12 +9.1% 0.92x
Improvement
COWArrayGuaranteedParameterOverhead 10819 4319 -60.1% 2.50x
SuffixCountableRangeLazy 12 11 -8.3% 1.09x

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
ArraySetElement.o 1167 1309 +12.2% 0.89x
ArraySubscript.o 3914 4275 +9.2% 0.92x
Sim2DArray.o 1450 1576 +8.7% 0.92x
XorLoop.o 1938 2098 +8.3% 0.92x
ArrayInClass.o 1840 1982 +7.7% 0.93x
Memset.o 1988 2114 +6.3% 0.94x
COWArrayGuaranteedParameterOverhead.o 1387 1467 +5.8% 0.95x
Array2D.o 4379 4629 +5.7% 0.95x
RandomShuffle.o 3419 3513 +2.7% 0.97x
SortIntPyramids.o 12337 12657 +2.6% 0.97x
MonteCarloE.o 3690 3778 +2.4% 0.98x
ReversedCollections.o 11532 11778 +2.1% 0.98x
StaticArray.o 13019 13155 +1.0% 0.99x
Improvement
RemoveWhere.o 24278 23734 -2.2% 1.02x
Hash.o 20575 20223 -1.7% 1.02x
Walsh.o 6140 6052 -1.4% 1.01x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
Memset 11449 12517 +9.3% 0.91x
Improvement
COWArrayGuaranteedParameterOverhead 15468 8625 -44.2% 1.79x
SubstringFromLongString 12 11 -8.3% 1.09x (?)
SortStrings 3359 3132 -6.8% 1.07x

Code size: -swiftlibs

TEST OLD NEW DELTA RATIO
Regression
libswiftSwiftOnoneSupport.dylib 159744 163840 +2.6% 0.98x
Improvement
libswiftSwiftPrivateLibcExtras.dylib 24576 20480 -16.7% 1.20x
libswiftModelIO.dylib 45056 40960 -9.1% 1.10x
libswiftFoundation.dylib 1519616 1503232 -1.1% 1.01x
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
--------------

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.

3 participants