- Notifications
You must be signed in to change notification settings - Fork5.2k
Add ADVSIMD64 optimizations for System.Text.Encodings.Web#49847
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Add ADVSIMD64 optimizations for System.Text.Encodings.Web#49847
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedMar 19, 2021
Tagging subscribers to this area:@tarekgh,@eiriktsarpalis,@layomia Issue DetailsThis is a follow-up PR to#49373 which adds ARM64 SIMD optimizations to theFindFirstCharacterToEncode code paths. I'm not able to run BenchmarkDotNet on my SPX device for some reason, but I created a small console application to get some quick measurements. Baseline (release/5.0):46 ns for The.AdvSimd64.cs file is basically a carbon copy of the.Ssse3.cs file, but using AMD64 patterns ( We're relying on the increased unit test coverage given by the previous PR. I've also augmented the unit tests with an extra "insert this scurrilous BMP code point" check to validate that our UTF-16 -> ASCII conversion is working properly.
|
GrabYourPitchforks commentedMar 19, 2021
Heads up that you're likely to see changes in the perf lab benchmarkhere and inSystem.Text.Json as a result of recent PRs.
|
...stem.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.AdvSimd64.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...stem.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.AdvSimd64.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
eiriktsarpalis left a comment
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
...braries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
DrewScoggins commentedMar 19, 2021
Thanks for the tag@GrabYourPitchforks. We will keep an eye out for this on Tuesday when we triage. |
GrabYourPitchforks commentedMar 20, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Green CI? Sure, I'll take it! |
adamsitnik commentedMar 22, 2021
@GrabYourPitchforks what error are you getting? |
This is a follow-up PR to#49373 which adds ARM64 SIMD optimizations to theFindFirstCharacterToEncode code paths. I'm not able to run BenchmarkDotNet on my SPX device for some reason, but I created a small console application to get some quick measurements.
Baseline (release/5.0):46 ns for
HtmlEncoder.Default.FindFirstCharacterToEncodeUtf8(u8"The quick brown fox jumps over the lazy dog.")advsimd-optimized:8.8 ns for same input. (-81% wall clock time taken)
The.AdvSimd64.cs file is basically a carbon copy of the.Ssse3.cs file, but using AMD64 patterns (
tblandaddp) instead of SSSE3 instructions (pshufbandpmovmskb).We're relying on the increased unit test coverage given by the previous PR. I've also augmented the unit tests with an extra "insert this scurrilous BMP code point" check to validate that our UTF-16 -> ASCII conversion is working properly.