Skip to main content
Add performance stats
Source Link
Catskul
  • 19.8k
  • 16
  • 90
  • 122

boost::lexical_cast<std::string>(yourint) from boost/lexical_cast.hpp

Work's for everything with std::ostream support, but is not as fast as, for example, itoa

It even appears to be faster than stringstream or scanf:

boost::lexical_cast<std::string>(yourint)

Work's for everything with std::ostream support, but is not as fast as, for example, itoa

boost::lexical_cast<std::string>(yourint) from boost/lexical_cast.hpp

Work's for everything with std::ostream support, but is not as fast as, for example, itoa

It even appears to be faster than stringstream or scanf:

edited body
Source Link
ltjax
  • 16.1k
  • 3
  • 43
  • 64

boost::lexical_cast<std::string>(yourint)

Work's for everything with std::ostream support, but is not as fast as, for example, atoiitoa

boost::lexical_cast<std::string>(yourint)

Work's for everything with std::ostream support, but is not as fast as, for example, atoi

boost::lexical_cast<std::string>(yourint)

Work's for everything with std::ostream support, but is not as fast as, for example, itoa

Source Link
ltjax
  • 16.1k
  • 3
  • 43
  • 64

boost::lexical_cast<std::string>(yourint)

Work's for everything with std::ostream support, but is not as fast as, for example, atoi