-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Performance Benchmarking of ExistentialSpecializer #24065
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
Conversation
@atrick @slavapestov @eeckstein Please see the perf benchmark for ExistentialSpecializer. |
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 Raj!
I think it would be helpful if you add comments at the top of the benchmark source explaining why it is useful and how it exercises existential specialization.
429945c
to
78a0fe1
Compare
// compiler (without ExistentialSpecializer) can not achieve this feat. With | ||
// ExistentialSpecializer which enables generic specialization recursively in a | ||
// call chain, we are able to specialize line 84 for InsertionSort on integers. | ||
|
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.
@atrick please see the description here.
I just uploaded a new version with comment. Please see it. |
Thanks. |
@swift-ci benchmark |
@swift-ci smoke test |
Performance: -O
Performance: -Osize
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
|
This breaks the build on Linux. Please use the Swift stdlib's random APIs instead of arc4random_uniform(). |
I see. Let me fix it @slavapestov |
A benchmark for showing performance improvements using ExistentialSpecializer. This shows more than 20x speedup when ExistentialSpecializer is used.
This benchmark has been significantly modified from the original implementation available at https://github.com/raywenderlich/swift-algorithm-club/tree/master/Bucket%20Sort
and
our issue created at:
kodecocodes/swift-algorithm-club#863