-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Enable SIMD for JSON API #28937
Comments
Hey @hez2010 that's a great suggestion. We're in the middle of providing a new perf oriented set of JSON APIs for .NET Core 3.0. @ahsonkhan, what's your take on this? |
My personal take on this: |
I think we'll never have the option to be forgiving in parsing in the name of perf, due to security concerns. However, I don't see a reason why we shouldn't be speeding up the implementation using SIMD. |
SimdJsonSharp does full validation, including checking for valid UTF-8. However, it is designed around parsing large chunks and may need to be adjusted to provide something more "streamable" and memory efficient in addition to being fast. I recommend reading the papers about original SimdJson to figure out what it does and how it accomplished it. |
Any news on this? |
I'd defer to @ahsonkhan for his stance; but I would expect we aren't going to look into this for the 3.0 timeframe. Instead, 3.0 will likely aim towards getting the new API shipped and stable and perf improvements (like this) will be investigated for a future release. |
Precisely. The SIMD work definitely looks promising and we should definitely investigate how we can incorporate it into the implementation of |
See the paper https://arxiv.org/pdf/1902.08318.pdf on ideas for using SIMD See the git repo https://github.com/simdjson/simdjson |
Next step would be to identify concrete vectorization opportunities in the codebase. STJ already uses vectorization indirectly via the encoding routines in |
Triage: we should also assess prior art from other serializers and how they utilize SIMD. |
From @hez2010 on March 9, 2019 9:19
Is your feature request related to a problem? Please describe.
Feature request. Enable SIMD for the new Json APIs in ASP.NET Core 3.
Describe the solution you'd like
See SimdJsonSharp
With SIMD support, SimdJsonSharp is faster than any existing Json library on .NET.
I think the new Json APIs in ASP.NET Core 3 should add SIMD support to improve its performance.
Copied from original issue: dotnet/aspnetcore#8366
The text was updated successfully, but these errors were encountered: