You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm completely new to numeric-string-conversion, so please forgive if my question is naiive.
I implemented a replacement for std::to_string(vNumber) using std::string(fmt::format("{}", vNumber)) to convert floating point values (double and float) to std::string. On Linux (gcc-6, gcc-7) and MacOSX 10.11 (Apple clang) I get twice the performance of std::to_string() for double! But on MSVC 2015 and 2017, the performance is typically slightly worse than std::to_string(), typically ~120% of the execution time.
I'm confused if this is to be expected? I've seen the nice work in #147 but I'm not knowledgabe enough to understand if I need to wait for this or if already now the performance could be better.
The text was updated successfully, but these errors were encountered:
{fmt} relies on snprintf for floating-point formatting right now, so it all depends how snprintf and to_string are implemented. On MSVC snprintf is known to be of a very poor quality. This will be addressed by #147 once the new floating-point formatter which is mostly complete is fully tested and enabled.
I'm completely new to numeric-string-conversion, so please forgive if my question is naiive.
I implemented a replacement for
std::to_string(vNumber)
usingstd::string(fmt::format("{}", vNumber))
to convert floating point values (double and float) to std::string. On Linux (gcc-6, gcc-7) and MacOSX 10.11 (Apple clang) I get twice the performance ofstd::to_string()
for double! But on MSVC 2015 and 2017, the performance is typically slightly worse thanstd::to_string()
, typically ~120% of the execution time.I'm confused if this is to be expected? I've seen the nice work in #147 but I'm not knowledgabe enough to understand if I need to wait for this or if already now the performance could be better.
The text was updated successfully, but these errors were encountered: