-
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
Large memory dependency in OrdinalCasing::ToUpper #43732
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This is not true. the whole static array size is |
This is not going to work, at runtime we allocate more dynamic tables and add to this static array. |
Sorry, that was a typo, it's 2k which is still very large.
The existing code only replaces the null entries. I made one suggestion and there are other solutions to remove the large initialization dependency (about 1k of IL) in the code. |
I'll look at that. |
The table was initialized in the .cctor and it contains a large amount of object references, so the generated cctor was 1K IL. Replace with a byte table and a loop. Fixes dotnet#43732.
runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/OrdinalCasing.Icu.cs
Line 88 in 43bc8e8
25k2k and aggressively allocated in the static constructor but it needs to actually store only 32 bytes of data. Please replaced the multi-dimensional array with simple binary map (0 for existing null, 1 for s_noCasingPage).The text was updated successfully, but these errors were encountered: