Skip to content

[stdlib] Some cleanup enabled by _alwaysEmitIntoClient. #23026

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
Mar 4, 2019

Conversation

milseman
Copy link
Member

@milseman milseman commented Mar 1, 2019

Refactor some copy-pasted code into a helper computed variable and
outline some cold paths.

@milseman
Copy link
Member Author

milseman commented Mar 1, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Mar 1, 2019

Build failed
Swift Test OS X Platform
Git Sha - 8c6b9c0

@swift-ci
Copy link
Contributor

swift-ci commented Mar 1, 2019

Build failed
Swift Test Linux Platform
Git Sha - 8c6b9c0

@@ -83,8 +83,7 @@ extension Character {
_internalInvariant(_str._guts.isFastUTF8)

// TODO(@eject): Switch to a helper property on StringObject/StringGuts.
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this TODO and the one below no?

Refactor some copy-pasted code into a helper computed variable and
outline some cold paths.
@milseman milseman force-pushed the client_helper_emitted branch from 8c6b9c0 to 19014a8 Compare March 3, 2019 22:10
@milseman
Copy link
Member Author

milseman commented Mar 3, 2019

@swift-ci please test

@milseman
Copy link
Member Author

milseman commented Mar 3, 2019

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Mar 3, 2019

Build failed
Swift Test OS X Platform
Git Sha - 8c6b9c0

@swift-ci
Copy link
Contributor

swift-ci commented Mar 3, 2019

Build failed
Swift Test Linux Platform
Git Sha - 8c6b9c0

@swift-ci
Copy link
Contributor

swift-ci commented Mar 3, 2019

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
DictionaryBridgeToObjC_Access 1095 919 -16.1% 1.19x (?)
StringFromLongWholeSubstring 11 10 -9.1% 1.10x (?)
FlattenListLoop 4336 3975 -8.3% 1.09x (?)
Array2D 7520 6912 -8.1% 1.09x (?)
MapReduce 397 368 -7.3% 1.08x
FlattenListFlatMap 6542 6076 -7.1% 1.08x (?)
MapReduceAnyCollection 397 369 -7.1% 1.08x (?)

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
UTF8Decode.o 12746 13338 +4.6% 0.96x
WordCount.o 44939 45523 +1.3% 0.99x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Improvement
DictionaryBridgeToObjC_Access 1031 932 -9.6% 1.11x (?)
StringFromLongWholeSubstring 11 10 -9.1% 1.10x (?)
FlattenListLoop 4431 4069 -8.2% 1.09x (?)
Array2D 7520 6912 -8.1% 1.09x (?)

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
WordCount.o 40660 41220 +1.4% 0.99x
UTF8Decode.o 11025 11137 +1.0% 0.99x
Improvement
RC4.o 3878 3721 -4.0% 1.04x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
ArrayOfGenericPOD2 1065 1236 +16.1% 0.86x (?)
SubstringEquatable 7511 8557 +13.9% 0.88x (?)
ArrayOfPOD 777 856 +10.2% 0.91x (?)
SubstringFromLongString 11 12 +9.1% 0.92x (?)
Improvement
RemoveWhereFilterStrings 4570 4072 -10.9% 1.12x (?)
StrComplexWalk 7280 6560 -9.9% 1.11x
CharIteration_korean_unicodeScalars_Backwards 390240 357520 -8.4% 1.09x (?)
CharIteration_punctuated_unicodeScalars_Backwards 87480 80160 -8.4% 1.09x (?)
CharIteration_chinese_unicodeScalars_Backwards 302840 277520 -8.4% 1.09x (?)
CharIteration_japanese_unicodeScalars_Backwards 481920 442560 -8.2% 1.09x (?)
CharIteration_ascii_unicodeScalars_Backwards 398120 367280 -7.7% 1.08x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 68600 63480 -7.5% 1.08x (?)
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

@milseman milseman merged commit dc89cc0 into swiftlang:master Mar 4, 2019
@milseman milseman deleted the client_helper_emitted branch March 4, 2019 15:40
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