.NET 11 Migration Plan #58
jordansrowles
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
net11.0work until .NET 10 is dropped. Don't make the common path worse just to use a shiny API.So what we gettin?
BFloat16vector experimentSystem.IO.PipelinesimprovementsDeprecate ZstdSharp compression sidecar for >= .NET 11
ZstandardStream,ZstandardEncoderandZstandardDecoderSource-gen polymorphic JSON
[JsonDerivedType]danceclosed[JsonDerivedType]approach[JsonDerivedType]should still win where we need stable/manual discriminators[JsonInclude]and nullablebyte[]JSON Lines streaming
System.Text.Jsoncan serialiseIAsyncEnumerable<T>directly as JSON Lines/NDJSONJsonTypeInfo<T>, so stays aligned with NativeAOTAVX-VNNI-512 support
AvxVnni.V512including byte/sbyte dot-product multiply-and-accumulate ops overVector512<int>Int8DistanceComputerthat manually converts quantised bytes into floats before doing vector multiplyVPDPBUSDVector<T>Revisit SIMD layer in a spike/experiment
Vector128/256/512includingZip,Unzip,Reverse,Concat*and new construction/composition primitivesInt8DistanceComputercurrently usesVector256, a stackallocated float buffer and scalar population before loading the vectorWider ARM/SVE support
Vector<T>can use the actual SVE vector width on supported Arm64 hardware rather than effectively being stuck at 128 bitsVector<T>path between architecture-specific intrinsics and scalarRuntime Async
Task/ValueTaskfast paths, tail-awaits,Task.Yield(), continuation handling and Task/ValueTask adaptationDo benchmark comparisons:
Benchmark both hot and boring paths:
Don't enable it globally just because the microbenchmarks look good.
Rowles.Text Unicode improvements
RunePositionenumerates UTF-8/UTF-16 while giving you the rune's start position and encoded lengthString,StringBuilder,TextWriterand casing APIsRunePositionis good because correct token offsets around supplementary Unicode chars become much easierUtf16.IsValidUtf16.IndexOfInvalidSubsequenceUtf8.IndexOfInvalidSubsequenceOrdinal casing
OrdinalIgnoreCase, with span forms for no allocationPartial numeric parsing
INumberBase<T>.TryParsePartialparses a numeric prefix from a span and returns how much input it consumed"age:[18 TO 40]""price:19.95^2.0""lat,lon"Stream adapters / fewer pointless copies
.NET 11 adds stream wrappers over existing data, including:
ReadOnlyMemoryStreamWritableMemoryStreamReadOnlySequenceStreamStringStreamAudit places that currently do things like:
ReadOnlyMemory<byte>->MemoryStreamReadOnlySequence<byte>->byte[]->Streamstring-> UTF-8byte[]->StreamMostly a plumbing cleanup, but exactly the sort of pointless allocation LeanCorpus should avoid
Particularly relevant around codecs, stored fields, server transport and compression
Hard-link backup/snapshot optimisation
File.CreateHardLink/FileInfo.CreateAsHardLinkCopyHardLinkWhenPossibleAutoAutocan hard-link unchanged segment files on the same filesystem and fall back to copies otherwiseBFloat16vector experimentSystem.Numerics.BFloat16supportNativeAOT/runtime improvements
System.IO.PipelinesimprovementsProcess API cleanup
.NET 11 adds higher-level process helpers such as:
Plus:
Useful for benchmark/profiling tooling that invokes:
dotnet-tracedotnet-countersdotnet-gcdumpKillOnParentExitis especially useful for stopping diagnostic children being orphanedDoesn't justify replacing PowerShell devops with C# again. Use it where C# already owns the process
Source generator improvements
StringBuilder.MoveChunkscan move a builder's internal chunk chain rather than copying everything throughToString()DocumentMapEmitterand friends currently build generated output throughStringBuilderSourceTextTest/devops improvements
dotnet build/dotnet testloopsNew test controls include things like:
Generic random APIs
Random.NextInteger<T>/NextBinaryFloat<T>APIs can simplify fuzz, chaos and benchmark input generationDont
net11.0into a completely separate implementation of the engineThe general theme should be: delete dependencies, delete allocations, improve Unicode correctness, improve AOT/server behaviour and add specialised hardware paths where they actually win.
All reactions