-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Benchmarks] Update benchmarks to Swift 4 #14623
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
[Benchmarks] Update benchmarks to Swift 4 #14623
Conversation
@swift-ci please smoke benchmark |
sorry @Rostepher I mis-clicked you there... |
Build comment file:Optimized (O)Regression (10)
Improvement (21)
No Changes (331)
Unoptimized (Onone)Regression (16)
Improvement (10)
No Changes (336)
Hardware Overview
|
@swift-ci please smoke test |
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!
data.withUnsafeMutableBytes { (ptr: UnsafeMutablePointer<UInt8>) -> () in | ||
for i in 0..<data.count { | ||
for i in 0..<n { |
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.
Doing optimizer's job ;-)
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.
nah, suppressing an exclusive access warning
@@ -144,7 +144,7 @@ let charToString = { (c: Character) -> String in String(c) } | |||
let charToInt = stringToInt • charToString | |||
|
|||
func sum<S: Sequence>(_ nums: S)->S.Iterator.Element where S.Iterator.Element: FixedWidthInteger { | |||
return nums.reduce(0) { $0.0 + $0.1 } | |||
return nums.reduce(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.
That'll start failing eventually.. I think. When the SE-110 is reconsidered again.
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 dislike that change so this is a pro not a con AFAIAC :), but the reason I changed it is cos it's now $0
and $1
so I think it's SE-110-compatible.
@@ -50,7 +42,7 @@ func match(regexp: String, text: String) -> Bool { | |||
} | |||
|
|||
/* matchhere: search for regexp at beginning of text */ | |||
func matchHere(_ regexp: String, _ text: String) -> Bool { | |||
func matchHere(_ regexp: Substring, _ text: Substring) -> 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.
Funny.. One would think that this would speed things up a little.
StringMatch | 7203 | 8176 | +13.5% | 0.88x
I don't think we need to rush it out, so let's give a full benchmark suite a try to validate that regressions we see in smoke run are not that bad, or otherwise. @swift-ci Please benchmark |
@swift-ci please benchmark |
Build comment file:Optimized (O)Regression (12)
Improvement (16)
No Changes (334)
Unoptimized (Onone)Regression (12)
Improvement (8)
No Changes (342)
Hardware Overview
|
@moiseev looks like the |
Update benchmarks to Swift 4. Just seeing if doing this makes any of them change, first, then we'll see if we want to make this change at this particular time.
Also I'm immensely suspicious of all that
truncatingBitPattern:
Edit: Looks like all OK except maybe some regressions in debug. We should probably do this.