Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Consider using Grisu3 + Dragon4 for double.ToString() conversion. #5609
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.