google.stringencoders vs (boost.string_algo & boost.lexical_cast)

Hi! stringencoders are told to be 2x faster than std approaches. But what about boost? Has somebody tested the performance of both libraries? I mean toLower, toUpper, itoa, dtoa functions. Thank you

Roman Shmelev wrote:
stringencoders are told to be 2x faster than std approaches. But what about boost?
Given boost::lexical_cast and boost::format are using standard C++ streams, which are known to be slower than C sprintf and even more slower than itoa dtoa, the answer seems obvious. Now however, a string formatting DSEL could probably compete with this library. I don't know if there is one in Boost.

Mathias Gaunard wrote:
Roman Shmelev wrote:
stringencoders are told to be 2x faster than std approaches. But what about boost?
Given boost::lexical_cast and boost::format are using standard C++ streams, which are known to be slower than C sprintf and even more slower than itoa dtoa, the answer seems obvious.
Now however, a string formatting DSEL could probably compete with this library. I don't know if there is one in Boost.
boost.string.convert has been submitted for review. Jeff

Mathias Gaunard skrev:
Roman Shmelev wrote:
stringencoders are told to be 2x faster than std approaches. But what about boost?
Given boost::lexical_cast and boost::format are using standard C++ streams, which are known to be slower than C sprintf and even more slower than itoa dtoa, the answer seems obvious.
boost::lexical_cast bypasses streams for certain types as an optimization. -Thorsten
participants (4)
-
Jeff Flinn
-
Mathias Gaunard
-
Roman Shmelev
-
Thorsten Ottosen