-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Convert Decimal to all-managed implementation #10437
Comments
Once this is done the resulting implementation should move to System.Private.CoreLib/shared/System/Decimal.cs and both CoreCLR and CoreRT will use it. |
dotnet/corert#4452 and dotnet/corert#4997 have most of the performance work done and the remaining performance regressions affect only x86 (everything else is already faster than the current native implementation). The following table has the remaining methods that need work, in particular, ADD and MUL are significantly slower. 32-bit x86
|
Test coverage should be pretty exhaustive already from dotnet/corefx#24053 and dotnet/corefx#26338. |
Also, compat issue with the CoreRT implementation needs to be addressed before this can land in CoreCLR: dotnet/corert#4994 |
I'll start working on making decimal a readonly struct in corert so that dotnet/corert#4994 can be resolved before decimal is shared with CoreCRL. |
CoreCLR's is in
https://github.com/dotnet/coreclr/blob/master/src/System.Private.CoreLib/src/System/Decimal.cs
https://github.com/dotnet/coreclr/blob/master/src/classlibnative/bcltype/decimal.cpp
The place to start is by grabbing the code verbatim from CoreRT and measuring performance, then optimizing to fix any regression:
https://github.com/dotnet/corert/blob/master/src/System.Private.CoreLib/src/System/Decimal.cs
https://github.com/dotnet/corert/blob/master/src/System.Private.CoreLib/src/System/Decimal.DecCalc.cs
Ensuring tests have good coverage, of course.
The text was updated successfully, but these errors were encountered: