-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
.NET 10 P1 -- Runtime and Libraries changes #9715
Conversation
If there are community PRs, at-mention the folks and get them added. We can continue to use the same general format as we've used in the past where we give community credit. |
|
||
In .NET 9, the JIT gained the ability to allocate objects on the stack, when the object is guaranteed to not outlive its parent method. Not only does stack allocation reduce the number of objects the GC has to track, but it also unlocks other optimizations: For example, after an object has been stack-allocated, the JIT can consider replacing it entirely with its scalar values. Because of this, stack allocation is key to reducing the abstraction penalty of reference types. | ||
|
||
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now allocate arrays of value types on the stack when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. |
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.
cc @hez2010 @khushal1996, just making sure you're ok with the descriptions of your work.
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.
Glad to appear on the release note :)
While
the JIT will now allocate arrays of value types on the stack when it can make the same lifetime guarantees described above
should be
the JIT will now allocate arrays of value types that don't contain GC pointers on the stack when it can make the same lifetime guarantees described above
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, updated
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.
I am okay with the AVX10.2
description. Thanks for mentioning my contribution.
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.
Added a few suggestions for accuracy
Co-authored-by: Andy Ayers <[email protected]>
## Finding PEM-encoded Data in ASCII/UTF-8 | ||
|
||
The PEM encoding (originally "Privacy Enhanced Mail", but now used widely outside of email) is defined for "text", | ||
which means that the `PemEncoding` class was designed to run on `System.String` and `ReadOnlySpan<char>`. |
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.
which means that the
PemEncoding
class was designed to run
I'm not seeing the obvious conclusion that A leads to B.
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.
You don't think it's obvious that "text" meant "string"?
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.
OK. I get it now. Thanks.
@@ -49,7 +50,10 @@ In Preview 1, the JIT can now devirtualize and inline array interface methods, t | |||
|
|||
In .NET 9, the JIT gained the ability to allocate objects on the stack, when the object is guaranteed to not outlive its parent method. Not only does stack allocation reduce the number of objects the GC has to track, but it also unlocks other optimizations: For example, after an object has been stack-allocated, the JIT can consider replacing it entirely with its scalar values. Because of this, stack allocation is key to reducing the abstraction penalty of reference types. | |||
|
|||
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. | |||
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. |
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.
No need to say "Preview 1". It's implied.
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. | |
Thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. | |
|
||
Preview 1 enables support for the Advanced Vector Extensions (AVX) 10.2 for x64-based processors, thanks to [contributions](https://github.com/dotnet/runtime/pull/111209) from @khushal1996. .NET developers can try out the new intrinsics available in the `System.Runtime.Intrinsics.X86.Avx10v2` class once capable hardware is available. In the next several previews, we plan to further incorporate AVX10.2 support into the JIT's emitter to take full advantage of the instruction set's features. | ||
|
||
Because AVX10.2-enabled hardware is not yet available, the JIT's support for AVX10.2 is disabled by default for now. We plan to enable it once we have thoroughly tested it. |
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.
cc @JulieLeeMSFT @BruceForstall for note on AVX10.2 support
|
||
The type of the underlying collection is clear, and the JIT should be able to transform this snippet into the first one. However, array interfaces are implemented differently from "normal" interfaces, such that the JIT does not know how to devirtualize them. This means the enumerator calls in the for-each loop remain virtual, blocking multiple optimizations: inlining, stack allocation, and others. | ||
|
||
In Preview 1, the JIT can now devirtualize and inline array interface methods, thanks to work in [#108153](https://github.com/dotnet/runtime/pull/108153) and [#109209](https://github.com/dotnet/runtime/pull/109209). This is the first of many steps we will be taking to achieve performance parity between the above implementations, as detailed in our [de-abstraction plans](https://github.com/dotnet/runtime/issues/108913) for .NET 10. |
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.
In Preview 1, the JIT can now devirtualize and inline array interface methods, thanks to work in [#108153](https://github.com/dotnet/runtime/pull/108153) and [#109209](https://github.com/dotnet/runtime/pull/109209). This is the first of many steps we will be taking to achieve performance parity between the above implementations, as detailed in our [de-abstraction plans](https://github.com/dotnet/runtime/issues/108913) for .NET 10. | |
In Preview 1, the JIT can now devirtualize and inline array interface methods, thanks to work in [dotnet/runtime #108153](https://github.com/dotnet/runtime/pull/108153) and [dotnet/runtime #109209](https://github.com/dotnet/runtime/pull/109209). This is the first of many steps we will be taking to achieve performance parity between the above implementations, as detailed in our [de-abstraction plans](https://github.com/dotnet/runtime/issues/108913) for .NET 10. | |
Co-authored-by: Rich Lander <[email protected]>
|
||
In .NET 9, the JIT gained the ability to allocate objects on the stack, when the object is guaranteed to not outlive its parent method. Not only does stack allocation reduce the number of objects the GC has to track, but it also unlocks other optimizations: For example, after an object has been stack-allocated, the JIT can consider replacing it entirely with its scalar values. Because of this, stack allocation is key to reducing the abstraction penalty of reference types. | ||
|
||
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. |
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.
In Preview 1, thanks to [contributions](https://github.com/dotnet/runtime/pull/104906) from @hez2010, the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. | |
In Preview 1, thanks to [dotnet/runtime #104906](https://github.com/dotnet/runtime/pull/104906) (credit: [@hez2010](https://github.com/hez2010)), the JIT will now stack-allocate small fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described above. Among other [stack allocation enhancements](https://github.com/dotnet/runtime/issues/104936), we plan to expand this ability to arrays of reference types in the coming previews. | |
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.
It would be good to give an example of a fixed-size array of value types.
Like:
int[] numbers = [1, 2, 3];
or
int[] numbers = new int[12];
|
||
## AVX10.2 Support | ||
|
||
Preview 1 enables support for the Advanced Vector Extensions (AVX) 10.2 for x64-based processors, thanks to [contributions](https://github.com/dotnet/runtime/pull/111209) from @khushal1996. .NET developers can try out the new intrinsics available in the `System.Runtime.Intrinsics.X86.Avx10v2` class once capable hardware is available. In the next several previews, we plan to further incorporate AVX10.2 support into the JIT's emitter to take full advantage of the instruction set's features. |
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.
Preview 1 enables support for the Advanced Vector Extensions (AVX) 10.2 for x64-based processors, thanks to [contributions](https://github.com/dotnet/runtime/pull/111209) from @khushal1996. .NET developers can try out the new intrinsics available in the `System.Runtime.Intrinsics.X86.Avx10v2` class once capable hardware is available. In the next several previews, we plan to further incorporate AVX10.2 support into the JIT's emitter to take full advantage of the instruction set's features. | |
[dotnet/runtime #111209](https://github.com/dotnet/runtime/pull/111209) (credit: [@khushal1996](https://github.com/khushal1996)) enables support for the Advanced Vector Extensions (AVX) 10.2 for x64-based processors. The new intrinsics available in the `System.Runtime.Intrinsics.X86.Avx10v2` class can be tested once capable hardware is available. In the next several previews, we plan to further incorporate AVX10.2 support into the JIT's emitter to take full advantage of the instruction set's features. | |
Apply Rich's suggestion Co-authored-by: Rich Lander <[email protected]>
* Add .NET 10 P1 release note base files * add get started * add base binary file * revert links for build * fix links * update last link * Apply suggestions from code review Co-authored-by: Rich Lander <[email protected]> * Fix linter errors * add languages * add ef core 10 documentation * add more efcore release notes * fix lint issue in ef docs * update efcore * Preview 1 F# release notes (#9737) * Initial F# entry with links-needs cleanup * Remove template comments from F# release notes * Apply suggestions from code review Thanks! All these changes are great. Co-authored-by: Tomas Grosup <[email protected]> * a bit of consistency here to jump down layers * Fix typo in F# release notes --------- Co-authored-by: Tomas Grosup <[email protected]> Co-authored-by: James Montemagno <[email protected]> * Update release-notes/10.0/get-started.md Co-authored-by: Jon Galloway <[email protected]> * Update release-notes/10.0/preview/preview1/10.0.0-preview.1.md Co-authored-by: Jon Galloway <[email protected]> * update wpf * C# and VB release notes for Preview 1 (#9739) * First draft of C# and VB release notes * Apply suggestions from code review Co-authored-by: Martin Costello <[email protected]> * Update release-notes/10.0/preview/preview1/visualbasic.md Co-authored-by: Kathleen Dollard <[email protected]> * Add additional features My first draft had missed a few features. * Apply suggestions from code review Co-authored-by: Kathleen Dollard <[email protected]> * Update release-notes/10.0/preview/preview1/csharp.md --------- Co-authored-by: Martin Costello <[email protected]> Co-authored-by: James Montemagno <[email protected]> Co-authored-by: Kathleen Dollard <[email protected]> * .NET 10 Preview 1 - WinForms Release Notes (#9722) * First draft First draft of release nites * Added AI message I did use AI to translate to markdown from docx formats. * Update release-notes/10.0/preview/preview1/winforms.md Co-authored-by: Loni Tra <[email protected]> * Applying feedback Applying the latest feedback and correcting a couple mistakes. * Applying final feedback Adding a few tweaks based on Tanya's feedback. * Best Practices * Final round of feedback * Update release-notes/10.0/preview/preview1/winforms.md * a bit of cleanup * Update winforms.md Duplicated text. * duplicated content --------- Co-authored-by: Loni Tra <[email protected]> Co-authored-by: Rich Lander <[email protected]> Co-authored-by: Rich Lander <[email protected]> Co-authored-by: Tanya Solyanik <[email protected]> Co-authored-by: James Montemagno <[email protected]> * small tweaks to ef preview 1 release notes * one more tiny tweak to ef core notes * release notes for PrunePackageReferences (#9744) * Fix markdown lint * Add containers release notes for .NET 10 Preview 1 (#9746) * Update containers section on main 10p1 readme * Add release notes for containers * Change Docker to container Co-authored-by: Matt Thalman <[email protected]> * Put Ubuntu announcement first * Apply suggestions from code review Co-authored-by: Rich Lander <[email protected]> * Remove extra newlines * Update haedings and links --------- Co-authored-by: Matt Thalman <[email protected]> Co-authored-by: Rich Lander <[email protected]> * .NET 10 P1 -- Runtime and Libraries changes (#9715) * Create runtime branch * Add cryptography notes * Fix typo * Add ISOWeek overloads for DateOnly type * ZipArchive * Remove duplicate ISOWeek method overloads section * Add String Normalization APIs for Span<char> * Fix formatting in String Normalization APIs section * Fix formatting for String Normalization APIs section * Fix formatting for String Normalization APIs section * Update String Normalization APIs section * Update String Normalization APIs section * Doc formatting fix * Adding TimeSpan note * Add JIT notes * Convert tabs to spaces * Better ZipArchive stats * Fix stack allocation description * Feedback Co-authored-by: Andy Ayers <[email protected]> * Add AVX10.2 experimental note, and feedback * "C-style" -> "typical" Co-authored-by: Rich Lander <[email protected]> * Add stack allocation example * Numeric ordering, ordered dictionary, json options, matrix operations * Apply suggestions from code review * Update release-notes/10.0/preview/preview1/libraries.md Apply Rich's suggestion Co-authored-by: Rich Lander <[email protected]> * Update release-notes/10.0/preview/preview1/libraries.md * Fix linter issues --------- Co-authored-by: Jeremy Barton <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]> Co-authored-by: carlossanlop <[email protected]> Co-authored-by: Aman Khalid <[email protected]> Co-authored-by: Andy Ayers <[email protected]> Co-authored-by: Pranav Senthilnathan <[email protected]> * Add ASP.NET Core release notes for .NET 10 Preview 1 (#9740) * Remove extra line in release notes. * Add link to install packages on Chiseled images * Update C# 14 release notes * Remove extra newlines in release notes. * update md * .NET MAUI in .NET 10 Preview 1 (#9727) * [Draft] .NET MAUI in .NET 10 Preview 1 * Update release-notes/10.0/preview/preview1/dotnetmaui.md Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * Update release-notes/10.0/preview/preview1/dotnetmaui.md Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * Apply suggestions from code review Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * cleanup * add info about handlers * Update dotnetmaui.md added Android notes * Update dotnetmaui.md removed community contributions section since we don't have any yet. * cleanup * add ios information --------- Co-authored-by: James Montemagno <[email protected]> Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * update md * trailing * Update wpf.md * Update release-notes/10.0/preview/preview1/10.0.0-preview.1.md Co-authored-by: Jon Galloway <[email protected]> * Update release-notes/10.0/preview/preview1/README.md Co-authored-by: Jon Galloway <[email protected]> * updates * Call out pruning warnings in P1 release notes (#9752) * Call out pruning warnings * Update release-notes/10.0/preview/preview1/sdk.md Co-authored-by: Martin Costello <[email protected]> * Update release-notes/10.0/preview/preview1/sdk.md --------- Co-authored-by: Martin Costello <[email protected]> * Update 10.0.0-preview.1.md * Add files via upload * Update releases-index.json * Add files via upload * Update release-notes/10.0/preview/preview1/10.0.0-preview.1.md Co-authored-by: Logan Bussell <[email protected]> --------- Co-authored-by: Jon Galloway <[email protected]> Co-authored-by: Rich Lander <[email protected]> Co-authored-by: Rich Lander <[email protected]> Co-authored-by: maumar <[email protected]> Co-authored-by: Kathleen Dollard <[email protected]> Co-authored-by: Tomas Grosup <[email protected]> Co-authored-by: Bill Wagner <[email protected]> Co-authored-by: Martin Costello <[email protected]> Co-authored-by: Kathleen Dollard <[email protected]> Co-authored-by: Merrie McGaw <[email protected]> Co-authored-by: Loni Tra <[email protected]> Co-authored-by: Tanya Solyanik <[email protected]> Co-authored-by: Chet Husk <[email protected]> Co-authored-by: Logan Bussell <[email protected]> Co-authored-by: Matt Thalman <[email protected]> Co-authored-by: Jeremy Barton <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]> Co-authored-by: carlossanlop <[email protected]> Co-authored-by: Aman Khalid <[email protected]> Co-authored-by: Andy Ayers <[email protected]> Co-authored-by: Pranav Senthilnathan <[email protected]> Co-authored-by: Daniel Roth <[email protected]> Co-authored-by: David Ortinau <[email protected]> Co-authored-by: Rolf Bjarne Kvinge <[email protected]> Co-authored-by: Nikolche Kolev <[email protected]> Co-authored-by: Rahul Bhandari <[email protected]>
This PR will be merged on Friday after 12pm with all suggestions committed. We can continue to make changes through the normal GH mechanisms. We're shipping on Tuesday with Monday being a holiday. We are best served by establishing a "good" baseline in advance of ship day.