Skip to content

[interop] cxx vector benchmark - reenable without SwiftPM support #61565

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 2 commits into from
Nov 4, 2022

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Oct 13, 2022

No description provided.

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Oct 13, 2022
@hyp
Copy link
Contributor Author

hyp commented Oct 13, 2022

@swift-ci please test

@hyp hyp marked this pull request as ready for review October 13, 2022 16:55
@hyp hyp force-pushed the eng/benchmark-relinux branch from 99694b0 to 63691a1 Compare October 20, 2022 00:22
@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please test linux platform

@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please build macOS toolchain

@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please build toolchain

@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please test linux platform

@hyp hyp force-pushed the eng/benchmark-relinux branch from 63691a1 to b54434f Compare October 20, 2022 20:47
@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please build toolchain

@hyp hyp force-pushed the eng/benchmark-relinux branch from b54434f to 029ec7a Compare October 20, 2022 23:14
@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please test linux platform

@hyp
Copy link
Contributor Author

hyp commented Oct 20, 2022

@swift-ci please build toolchain

@hyp
Copy link
Contributor Author

hyp commented Oct 21, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Oct 21, 2022

@swift-ci please benchmark

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Oct 21, 2022

@swift-ci please benchmark

@hyp hyp changed the title [interop] cxx vector benchmark - reenable linux after #61547 got fixed [interop] cxx vector benchmark - reenable without SwiftPM support Oct 21, 2022
@hyp
Copy link
Contributor Author

hyp commented Nov 1, 2022

@swift-ci please benchmark

1 similar comment
@hyp
Copy link
Contributor Author

hyp commented Nov 2, 2022

@swift-ci please benchmark

@hyp
Copy link
Contributor Author

hyp commented Nov 2, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Nov 2, 2022

@swift-ci please build toolchain

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

Results:

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
FlattenListLoop 976 1615 +65.5% 0.60x (?)
LineSink.characters.alpha 67 84 +25.4% 0.80x (?)
Dictionary3 121 134 +10.7% 0.90x (?)
NSError 101 109 +7.9% 0.93x (?)
 
Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 11 11 11
CxxVecU32.sum.Swift.forInLoop 24 24 24
CxxVecU32.sum.Swift.iteratorLoop 11 11 11
CxxVecU32.sum.Swift.reduce 24 24 24
CxxVecU32.sum.Swift.subscriptLoop 11 11 11

Code size: -O

Regression OLD NEW DELTA RATIO
CxxVectorSum.o 78 10256 +13048.6% 0.01x

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
FlattenListFlatMap 2452 3879 +58.2% 0.63x (?)
Dictionary4 159 201 +26.4% 0.79x (?)
ArrayInClass 195 215 +10.3% 0.91x (?)
PrefixAnySeqCRangeIter 13 14 +7.7% 0.93x (?)
PrefixWhileAnySequence 185 199 +7.6% 0.93x (?)
 
Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 81 81 81
CxxVecU32.sum.Swift.forInLoop 62 63 62
CxxVecU32.sum.Swift.iteratorLoop 81 81 81
CxxVecU32.sum.Swift.reduce 61 62 61
CxxVecU32.sum.Swift.subscriptLoop 81 81 81

Code size: -Osize

Regression OLD NEW DELTA RATIO
CxxVectorSum.o 70 8618 +12211.3% 0.01x

Performance (x86_64): -Onone

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubNSDateRefAccess 3175 3555 +12.0% 0.89x (?)
 
Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 1584 1614 1595
CxxVecU32.sum.Swift.forInLoop 7760 8695 8184
CxxVecU32.sum.Swift.iteratorLoop 1890 2163 2021
CxxVecU32.sum.Swift.reduce 9473 9708 9554
CxxVecU32.sum.Swift.subscriptLoop 1783 1894 1820

Code size: -swiftlibs

Benchmark Check Report
⚠️🔤 CxxVecU32.sum.Swift.forInLoop name is composed of 5 words.
Split CxxVecU32.sum.Swift.forInLoop name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming
⛔️⏱ CxxVecU32.sum.Swift.forInLoop has setup overhead of 6 μs (23.1%).
Move initialization of benchmark data to the setUpFunction registered in BenchmarkInfo.
⚠️🔤 CxxVecU32.sum.Cxx.rangedForLoop name is composed of 5 words.
Split CxxVecU32.sum.Cxx.rangedForLoop name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming
⚠️ CxxVecU32.sum.Cxx.rangedForLoop execution took 10 μs.
Increase the workload of CxxVecU32.sum.Cxx.rangedForLoop to be more than 20 μs.
⚠️ CxxVecU32.sum.Swift.iteratorLoop execution took 11 μs.
Increase the workload of CxxVecU32.sum.Swift.iteratorLoop to be more than 20 μs.
⚠️ CxxVecU32.sum.Swift.subscriptLoop execution took 11 μs.
Increase the workload of CxxVecU32.sum.Swift.subscriptLoop to be more than 20 μs.
⛔️⏱ CxxVecU32.sum.Swift.reduce has setup overhead of 6 μs (23.1%).
Move initialization of benchmark data to the setUpFunction registered in BenchmarkInfo.
⚠️Ⓜ️ CxxVecU32.sum.Swift.reduce has very wide range of memory used between independent, repeated measurements.
CxxVecU32.sum.Swift.reduce mem_pages [i1, i2]: min=[55, 55] 𝚫=0 R=[0, 57]
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: 32 GB

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please test macOS platform

@hyp hyp force-pushed the eng/benchmark-relinux branch from d335ffd to d09f2c9 Compare November 3, 2022 17:40
@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please benchmark

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please build toolchain

@hyp hyp force-pushed the eng/benchmark-relinux branch from d09f2c9 to cd63444 Compare November 3, 2022 18:55
@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please benchmark

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

@swift-ci please build toolchain

@hyp
Copy link
Contributor Author

hyp commented Nov 3, 2022

Results:

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
LineSink.characters.alpha 67 85 +26.9% 0.79x
FlattenListLoop 1128 1222 +8.3% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
FlattenListFlatMap 4553 3931 -13.7% 1.16x (?)
 
Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 9 9 9
CxxVecU32.sum.Swift.forInLoop 21 21 21
CxxVecU32.sum.Swift.iteratorLoop 12 13 13
CxxVecU32.sum.Swift.reduce 25 33 28
CxxVecU32.sum.Swift.subscriptLoop 10 13 12

Code size: -O

Regression OLD NEW DELTA RATIO
CxxVectorSum.o 78 10256 +13048.6% 0.01x

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
FlattenListLoop 975 1380 +41.5% 0.71x (?)
Dictionary4 157 203 +29.3% 0.77x (?)
StringWalk 1240 1360 +9.7% 0.91x (?)
PrefixWhileAnySequence 185 199 +7.6% 0.93x (?)
PrefixWhileSequence 185 199 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
PrefixAnySeqCntRange 16 14 -12.5% 1.14x (?)
 
Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 76 78 77
CxxVecU32.sum.Swift.forInLoop 58 59 58
CxxVecU32.sum.Swift.iteratorLoop 76 77 76
CxxVecU32.sum.Swift.reduce 60 61 60
CxxVecU32.sum.Swift.subscriptLoop 76 76 76

Code size: -Osize

Regression OLD NEW DELTA RATIO
CxxVectorSum.o 70 8618 +12211.3% 0.01x

Performance (x86_64): -Onone

Added MIN MAX MEAN MAX_RSS
CxxVecU32.sum.Cxx.rangedForLoop 1697 1702 1699
CxxVecU32.sum.Swift.forInLoop 7612 8061 7876
CxxVecU32.sum.Swift.iteratorLoop 1777 1832 1808
CxxVecU32.sum.Swift.reduce 9524 9753 9612
CxxVecU32.sum.Swift.subscriptLoop 1774 1813 1790

Code size: -swiftlibs

Benchmark Check Report
⚠️ CxxVecU32.sum.Swift.subscriptLoop execution took 11 μs.
Increase the workload of CxxVecU32.sum.Swift.subscriptLoop to be more than 20 μs.
⚠️🔤 CxxVecU32.sum.Swift.forInLoop name is composed of 5 words.
Split CxxVecU32.sum.Swift.forInLoop name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming
⛔️⏱ CxxVecU32.sum.Swift.forInLoop has setup overhead of 2 μs (8.0%).
Move initialization of benchmark data to the setUpFunction registered in BenchmarkInfo.
⚠️ CxxVecU32.sum.Swift.iteratorLoop execution took 10 μs.
Increase the workload of CxxVecU32.sum.Swift.iteratorLoop to be more than 20 μs.
⚠️🔤 CxxVecU32.sum.Cxx.rangedForLoop name is composed of 5 words.
Split CxxVecU32.sum.Cxx.rangedForLoop name into dot-separated groups and variants. See http://bit.ly/BenchmarkNaming
⚠️ CxxVecU32.sum.Cxx.rangedForLoop execution took 10 μs.
Increase the workload of CxxVecU32.sum.Cxx.rangedForLoop to be more than 20 μs.
⛔️⏱ CxxVecU32.sum.Swift.reduce has setup overhead of 4 μs (15.4%).
Move initialization of benchmark data to the setUpFunction registered in BenchmarkInfo.
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: 32 GB

@hyp
Copy link
Contributor Author

hyp commented Nov 4, 2022

@swift-ci please test windows platform

@hyp hyp merged commit 4e36e21 into swiftlang:main Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant