This scenario comprises the following FastFormat code, and functional equivalents for all other libraries examined:
static std::string with_FF_Format(int value)
{
std::string str;
fastformat::fmt(str, "{0}", value);
return str;
}
const int args[] =
{
INT_MIN, -1000, -1, 0, 1, 10, 1000, INT_MAX
};
{ for(unsigned i = 0; i < ITERATIONS; ++i)
{
const int arg = args[i % STLSOFT_NUM_ELEMENTS(args)];
std::string res = with_FF_Format(arg);
}}
This is the
test/performance/performance.test.one_integer
performance test included in the
FastFormat 0.2.1 beta 6 distribution.
|
|
|