-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Array enumerators are not preinitialized anymore #82993
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsNoticed this by accident:
Previously, we were storing endIndex separately and passed a null array to the empty enumerator. Now we store an actual object reference and that aborts the optimization. Maybe we could lift that in the interpreter but that might open a can of worms.
|
This is a 0.3% size saving for Stage1. We not only allow array enumerators to be preinitialized again, but also avoid introducing many array `MethodTables` (looks like the new enumerators force array MethodTables for cases where we could have avoided them). I shaped the old code to look like after the refactor in dotnet#82751, but reintroduced the old classes. Fixes dotnet#82993.
This is a 0.3% size saving for Stage1. We not only allow array enumerators to be preinitialized again, but also avoid introducing many array `MethodTables` (looks like the new enumerators force array MethodTables for cases where we could have avoided them). Fixes #82993.
Noticed this by accident:
Hello world before #82751: ILC: Preinitialized 183 types out of 266.
After: ILC: Preinitialized 105 types out of 266.
Previously, we were storing endIndex separately and passed a null array to the empty enumerator. Now we store an actual object reference and that aborts the optimization. Maybe we could lift that in the interpreter but that might open a can of worms.
The text was updated successfully, but these errors were encountered: