-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[benchmark] Expand ParseInt benchmarks #29988
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] Expand ParseInt benchmarks #29988
Conversation
@swift-ci Please benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe 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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
@swift-ci Please benchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to pick a few (maybe ~ 5) representative benchmarks which cover most of the scenarios?
We should avoid inflating the number of benchmarks too much, because we want to keep the total runtime of benchmarking on an acceptable level. If we add exhaustive benchmarks for each small piece of the library and the language it's just too much.
I suggest to pick a few and add the .skip tag to all others. If someone wants to run all the integer parsing benchmarks, it's still possible with the -skipTags option. See ExistentialPerformance.swift as an example.
Also, we should avoid using gyb, especially in the benchmarks. Eventually we want to convert the benchmarks to a swiftpm package, where we cannot use gyb. Beside that, gyb has other problems (e.g. it complicates debugging).
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe 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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
@eeckstein Thanks, I added Good to know about the gyb usage. For this one do you want to just leave it as is for now, or delete the gyb file? (or another suggestion) |
@swift-ci Please benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe 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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Unfortunately no. But you can run benchmark/scripts/run_smoke_bench locally on your machine. You'll need to modify run_smoke_bench to pass the right options to the benchmark executable.
My preference is to not add the gyb file. |
There has been an effort to de-gyb, so it would certainly be preferable to not introduce new gyb based sources. |
@eeckstein @compnerd 👍 I've removed the gyb file. Let me know if you think we should try to generalize the test implementation functions as well. |
fb91091
to
c73b4ee
Compare
I'm also now skipping all but five specific tests, that should be representative both of the different code paths and fairly common real-world use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@swift-ci Please smoke test |
@swift-ci Please benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe 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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Expands the integer parsing benchmarks to distinguish between:
These are in preparation for a full rewrite of integer parsing (which I finally found some time to finish up), where performance will clearly vary along these axes.