Skip to content
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

Consider using Grisu3 + Dragon4 for double.ToString() conversion. #5609

mazong1123 opened this issue Aug 18, 2018 · 0 comments


Copy link

commented Aug 18, 2018

I saw we are using library function swprintf_s to convert a double value to string, which has performance issues that have been discussed in .NET Core. See dotnet/coreclr#10390 and dotnet/coreclr#10651

In .NET Core 2.0, there's a new implementation that combined Grisu3 + Dragon4 algorithms to significantly improved the performance (I should say probably 7x faster). See these two PRs: dotnet/coreclr#14646

Replace swprintf_s with the new implementation could make the double conversion much more faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.