Skip to content

SILOptimizer: move String concatination optimization from SILCombine/ConstantFolding to StringOptimization. #33282

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
Aug 4, 2020

Conversation

eeckstein
Copy link
Contributor

This simplifies some code and it's not required to try this optimization on every run of SILCombine and ConstantPropagation.

…ConstantFolding to StringOptimization.

This simplifies some code and it's not required to try this optimization on every run of SILCombine and ConstantPropagation.
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Aug 4, 2020

Performance: -O

Regression OLD NEW DELTA RATIO
Data.append.Sequence.64kB.Count 25 29 +16.0% 0.86x (?)
 
Improvement OLD NEW DELTA RATIO
CharIteration_korean_unicodeScalars 3120 2800 -10.3% 1.11x (?)
CharIndexing_ascii_unicodeScalars 3840 3520 -8.3% 1.09x
CharIteration_japanese_unicodeScalars 4040 3720 -7.9% 1.09x (?)
CharIteration_punctuatedJapanese_unicodeScalars 560 520 -7.1% 1.08x (?)
CharIteration_chinese_unicodeScalars 2400 2240 -6.7% 1.07x (?)

Code size: -O

Performance: -Osize

Regression OLD NEW DELTA RATIO
FlattenListLoop 1204 1530 +27.1% 0.79x (?)
 
Improvement OLD NEW DELTA RATIO
DataCreateMedium 6200 4000 -35.5% 1.55x
CharIteration_russian_unicodeScalars_Backwards 4120 3520 -14.6% 1.17x
CharIteration_japanese_unicodeScalars_Backwards 6400 5480 -14.4% 1.17x
CharIteration_korean_unicodeScalars_Backwards 5040 4320 -14.3% 1.17x
CharIteration_chinese_unicodeScalars_Backwards 3680 3160 -14.1% 1.16x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 960 840 -12.5% 1.14x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 1640 1440 -12.2% 1.14x (?)
FlattenListFlatMap 4081 3604 -11.7% 1.13x (?)
CharIndexing_japanese_unicodeScalars_Backwards 10440 9400 -10.0% 1.11x (?)
CharIteration_punctuated_unicodeScalars_Backwards 840 760 -9.5% 1.11x
CharIndexing_chinese_unicodeScalars_Backwards 6520 5920 -9.2% 1.10x (?)
DataAccessBytesMedium 59 54 -8.5% 1.09x (?)
CharIndexing_ascii_unicodeScalars_Backwards 7120 6560 -7.9% 1.09x (?)
CharIndexing_tweet_unicodeScalars_Backwards 14000 12920 -7.7% 1.08x (?)
CharIndexing_russian_unicodeScalars_Backwards 7480 6920 -7.5% 1.08x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 1800 1680 -6.7% 1.07x (?)

Code size: -Osize

Performance: -Onone

Code size: -swiftlibs

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 mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@eeckstein eeckstein merged commit aa6e600 into swiftlang:master Aug 4, 2020
@eeckstein eeckstein deleted the string-optimization branch August 4, 2020 18:55
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