This scenario comprises the following FastFormat code, and functional equivalents for all other libraries examined:
std::string arg0 = "abc"; const char arg1[] = "def"; stlsoft::simple_string arg2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; std::string arg3(10, '~'); stlsoft::simple_string arg4 = "abcdefghijklmnopqrstuvwxyz"; std::string arg5 = "0123456789"; const char arg6[] = " "; stlsoft::string_view arg7(&arg6[0], STLSOFT_NUM_ELEMENTS(arg6) - 1); std::string arg8(1000, '#'); stlsoft::string_view arg9 = arg7; std::string sink; fastformat::fmt(sink, "{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}" , arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
This is the
test/performance/performance.test.ten_strings_twice
performance test included in the
FastFormat 0.2.1 beta 6 distribution.