Closed EgorBo closed 3 days ago
Tagging subscribers to this area: @dotnet/area-system-text-encodings-web See info in area-owners.md if you want to be subscribed.
ugh, .NET Framework 😐
How does the performance compare with Mono?
How does the performance compare with Mono?
This is a part of the global security initiative to improve code safety. We assume that extra nanoseconds in these APIs for mono workloads won't be a big deal. Not sure performance matters for quite old System.Text.Encodings.Web
at all, perhaps, only for HtmlEncoder
.
Contributes to https://github.com/dotnet/runtime/issues/94941 effort.
Should be ~zero performance difference as the JIT is smart enough to handle the safer equivalent, i.e.:
Codegen for
New
andOld
:Same for writing chars vs
"str".TryCopyTo
.PS:
SpanUtility.IsValidIndex
can also be just removed (propagated at all uses) so we can remove the whole file, but it's out of scope for this PR sinceIsValidIndex
is perfectly safe.