Skip to content

Comments

[WIP] Add SIMD support for Json APIs in ASP.NET Core 3#124647

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/enable-simd-for-json-api
Draft

[WIP] Add SIMD support for Json APIs in ASP.NET Core 3#124647
Copilot wants to merge 1 commit intomainfrom
copilot/enable-simd-for-json-api

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Enable SIMD for JSON API</issue_title>
<issue_description>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</issue_description>

<agent_instructions>Scan the System.Text.Json codebase for opportunities to vectorize methods as cited in the original issue and comments. If no immediate opportunities are found, please state so explicitly so we can close the issue.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@tannergooding 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. @eiriktsarpalis Next step would be to identify concrete vectorization opportunities in the codebase. STJ already uses vectorization indirectly via the encoding routines in `System.Text.Encodings.Web` and the Span helper methods. @tannergooding Many of the most popular SIMD implementations are not “strictly spec compliant” and may have edge case allowances that we can’t support in the built-in implementation

While some more opportunities likely exist, the type of perf gains some people are envisioning simply aren’t possible in a full featured, secure, and robust implementation.

See also the discussion above about being oriented towards different goals, such as streaming and incremental parsing vs parsing entire files at once or similar </comment_new>
<comment_new>@tannergooding
That being said, in general if there are incremental improvements with benchmarks showing the performance gains (ideally shown via the existing tests in dotnet/performance), we are open source and people are welcome to contribute

Larger changes should ideally be discussed with the area owners first. But isolated changes and targeted improvements are “typically” fine to just have a PR submitted


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Enable SIMD for JSON API

2 participants