-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add a benchmark for bridging String(contentsOfFile:...) #24326
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
Add a benchmark for bridging String(contentsOfFile:...) #24326
Conversation
c7b0738
to
99b45b1
Compare
public func setup_stringFromFile() { | ||
#if _runtime(_ObjC) | ||
let url:URL | ||
if #available(OSX 10.12, iOS 10.0, *) { |
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.
bleh
@swift-ci please smoke 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.
If the intent is for this to be all-ASCII, add ASCII to the name.
"sphinx.txt" | ||
) | ||
} else { | ||
url = URL(fileURLWithPath: "/tmp/sphinx.txt") |
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.
Does Foundation have a mktemp equivalent?
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.
The call in the other else branch is the best way, there's a clunkier version I could use on old OSs if it's a problem
99b45b1
to
b3dd978
Compare
@swift-ci please smoke test and merge |
1 similar comment
@swift-ci please smoke test and merge |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
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
|
Can somebody please explain the intention behind this benchmark? All this does is run The If you meant to test the performance of |
I take that back! Looking at #24289 and #24386, I cannot believe the bridging can lead to this unbelievably convoluted and underperforming implementation behind the scenes. That is all kinds of wrong in my opinion. Improvements in #24386 lead to zero runtime of the
|
@Catfish-Man can probably provide more specific rationale, but there's a big issue with |
No description provided.