-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[benchmark] Add a CharacterProperties benchmark #13739
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 smoke test |
@swift-ci please smoke benchmark |
Build comment file:Optimized (O)Regression (5)
Improvement (5)
No Changes (320)
Added (2)
Unoptimized (Onone)Regression (6)
Improvement (9)
No Changes (315)
Added (2)
Hardware Overview
|
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.
LGTM! Wow, fetching has pretty significant overhead.
@@ -0,0 +1,108 @@ | |||
//===--- StringMatch.swift ------------------------------------------------===// |
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.
Nit: file name
% # Ignore the following warning. This _is_ the correct file to edit. | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// WARNING: This file is manually generated from .gyb template and should not | ||
// be directly modified. Instead, make changes to StringWalk.swift.gyb and run |
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.
Nit: file name
// Compute on the fly | ||
// | ||
// TODO: If UnicodeScalars ever exposes category, etc., implement the others! | ||
func isNewlineComputed(_ c: Character) -> Bool { |
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 a good idea to leave this in without a run_CharacterPropertiesComputed
?
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.
We only have an implementation of isNewline because CharacterSet's newlines are fixed, while the others are defined in terms of Unicode categories or properties that are version-specific (and thus run-time-dependent).
A run_CharacterPropertiesComputed
that only executes on newlines wouldn't be comparable to others, so I'm not sure it gives a useful signal.
edit: clearer wording
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.
I'm open to suggestions :-)
9ab2ac9
to
212c201
Compare
Whoops, hold on, need to base off of master proper... |
212c201
to
1c2954b
Compare
@swift-ci please smoke test and merge |
@swift-ci please smoke test |
No description provided.