-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[benchmark] UnsafeRawBufferPointer._copyContents #38827
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
@swift-ci please benchmark |
Performance (x86_64): -O
Code size: -O
Performance (x86_64): -Osize
Code size: -Osize
Performance (x86_64): -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
|
0a9421d
to
2699a85
Compare
7315d9c
to
0ad5a74
Compare
0ad5a74
to
e06d03e
Compare
@swift-ci please benchmark |
@swift-ci please smoke test |
Performance (x86_64): -O
Code size: -O
Performance (x86_64): -Osize
Code size: -Osize
Performance (x86_64): -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 smoke check |
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.
🚢
Co-authored-by: Karoy Lorentey <[email protected]>
@swift-ci please smoke test and merge |
Add a benchmark to measure
UnsafeRawBufferPointer._copyContents
. Prompted by the observation that creating an[UInt8]
from anUnsafeRawBufferPointer
is slow, while creating a[UInt8]
from anUnsafeBufferPointer<UInt8>
is much faster. This slowness was reported in https://bugs.swift.org/browse/SR-9604.The fast path to initialize
Array
from aCollection
ultimately relies on said collection's implementation of_copyContents
, therefore we benchmarkURBP
's implementation.