Re: [PATCH] Replace std::to_string for integers with optimized version

2019-06-18 Thread Jonathan Wakely
On 18/06/19 13:58 +0200, Christophe Lyon wrote: On Mon, 17 Jun 2019 at 15:21, Jonathan Wakely wrote: On 13/06/19 22:41 +0200, Christophe Lyon wrote: >Hi, > > >On Wed, 12 Jun 2019 at 16:54, Jonathan Wakely wrote: >> >> The std::to_chars functions from C++17 can be used to implement >> std::to_

Re: [PATCH] Replace std::to_string for integers with optimized version

2019-06-18 Thread Christophe Lyon
On Mon, 17 Jun 2019 at 15:21, Jonathan Wakely wrote: > > On 13/06/19 22:41 +0200, Christophe Lyon wrote: > >Hi, > > > > > >On Wed, 12 Jun 2019 at 16:54, Jonathan Wakely wrote: > >> > >> The std::to_chars functions from C++17 can be used to implement > >> std::to_string with much better performanc

Re: [PATCH] Replace std::to_string for integers with optimized version

2019-06-17 Thread Jonathan Wakely
On 13/06/19 22:41 +0200, Christophe Lyon wrote: Hi, On Wed, 12 Jun 2019 at 16:54, Jonathan Wakely wrote: The std::to_chars functions from C++17 can be used to implement std::to_string with much better performance than calling snprintf. Only the __detail::__to_chars_len and __detail::__to_cha

Re: [PATCH] Replace std::to_string for integers with optimized version

2019-06-13 Thread Christophe Lyon
Hi, On Wed, 12 Jun 2019 at 16:54, Jonathan Wakely wrote: > > The std::to_chars functions from C++17 can be used to implement > std::to_string with much better performance than calling snprintf. Only > the __detail::__to_chars_len and __detail::__to_chars_10 functions are > needed for to_string,

[PATCH] Replace std::to_string for integers with optimized version

2019-06-12 Thread Jonathan Wakely
The std::to_chars functions from C++17 can be used to implement std::to_string with much better performance than calling snprintf. Only the __detail::__to_chars_len and __detail::__to_chars_10 functions are needed for to_string, because it always outputs base 10 representations. The return type o