Skip to content
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

[benchmark] Rework SuperChars #21761

Merged
merged 2 commits into from Jan 10, 2019
Merged

[benchmark] Rework SuperChars #21761

merged 2 commits into from Jan 10, 2019

Conversation

milseman
Copy link
Contributor

Rework SuperChars into something that:

  • Doesn't crash in asserts configurations (i.e. has valid Characters)
  • Actually runs (i.e. use blackHole on comparison result)
  • Runs in around 1ms (it's cubic complexity in payload size)

Rework SuperChars into something that:

* Doesn't crash in asserts configurations (i.e. has valid Characters)
* Actually runs (i.e. use blackHole on comparison result)
* Runs in around 1ms (it's cubic complexity in payload size)
@milseman
Copy link
Contributor Author

@swift-ci please test

@milseman
Copy link
Contributor Author

@swift-ci please benchmark

@milseman
Copy link
Contributor Author

@palimondo, since I'm updating this benchmark, any recommendations or other things that should be changed?

@swift-ci
Copy link
Collaborator

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
DataAppendDataLargeToLarge 51400 37800 -26.5% 1.36x (?)
Added
SuperChars2 1770 1821 1787
Removed
SuperChars 3 3 3

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
SuperChars.o 1124 1478 +31.5% 0.76x

Performance: -Osize

TEST MIN MAX MEAN MAX_RSS
Added
SuperChars2 1778 1865 1807
Removed
SuperChars 3 3 3

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
SuperChars.o 1246 1600 +28.4% 0.78x

Performance: -Onone

TEST MIN MAX MEAN MAX_RSS
Added
SuperChars2 11915 12016 11961
Removed
SuperChars 126814 126978 126917
Benchmark Check Report
⚠️ SuperChars2 execution took at least 1766 μs.
Decrease the workload of SuperChars2 by a factor of 2 (10), to be less than 1000 μs.
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
--------------

Copy link
Collaborator

@palimondo palimondo left a comment

Choose a reason for hiding this comment

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

LGTM, but I took the liberty to lower the workload a bit further.

My local results on 2008 MBP, before (779252a):

TEST MIN Q1 MED Q3 MAX MAX_RSS(B)
SuperChars2 4515 4574 4610 4757 5058 49152

after (a30b774):

TEST MIN Q1 MED Q3 MAX MAX_RSS(B)
SuperChars2 1320 1326 1331 1339 1362 49152

@palimondo
Copy link
Collaborator

@swift-ci please benchmark

@palimondo
Copy link
Collaborator

@swift-ci please smoke test

@swift-ci
Copy link
Collaborator

Build comment file:

Performance: -O

TEST MIN MAX MEAN MAX_RSS
Added
SuperChars2 526 528 527
Removed
SuperChars 3 3 3

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
SuperChars.o 1124 1478 +31.5% 0.76x

Performance: -Osize

TEST MIN MAX MEAN MAX_RSS
Added
SuperChars2 527 529 528
Removed
SuperChars 3 3 3

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
SuperChars.o 1246 1600 +28.4% 0.78x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
StringBuilderWithLongSubstring 3190 3520 +10.3% 0.91x (?)
Added
SuperChars2 2376 2430 2394
Removed
SuperChars 115876 116232 116043
Benchmark Check Report
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
--------------

@palimondo palimondo merged commit 345c6db into apple:master Jan 10, 2019
@milseman milseman deleted the super_char_ger branch January 10, 2019 19:17
@milseman milseman mannequin mentioned this pull request Jan 10, 2019
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.

None yet

3 participants