From a69e43c9d743517909db4a4ecbf8a84bddce7b0a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 25 Nov 2022 09:52:02 -0800 Subject: [PATCH] Update benchmark results --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index a5840a27..c4a2b30c 100644 --- a/README.rst +++ b/README.rst @@ -191,17 +191,17 @@ Speed tests ================= ============= =========== Library Method Run Time, s ================= ============= =========== -libc printf 1.04 -libc++ std::ostream 3.05 -{fmt} 6.1.1 fmt::print 0.75 -Boost Format 1.67 boost::format 7.24 -Folly Format folly::format 2.23 +libc printf 0.91 +libc++ std::ostream 2.49 +{fmt} 9.1 fmt::print 0.74 +Boost Format 1.80 boost::format 6.26 +Folly Format folly::format 1.87 ================= ============= =========== -{fmt} is the fastest of the benchmarked methods, ~35% faster than ``printf``. +{fmt} is the fastest of the benchmarked methods, ~20% faster than ``printf``. The above results were generated by building ``tinyformat_test.cpp`` on macOS -10.14.6 with ``clang++ -O3 -DNDEBUG -DSPEED_TEST -DHAVE_FORMAT``, and taking the +12.6.1 with ``clang++ -O3 -DNDEBUG -DSPEED_TEST -DHAVE_FORMAT``, and taking the best of three runs. In the test, the format string ``"%0.10f:%04d:%+g:%s:%p:%c:%%\n"`` or equivalent is filled 2,000,000 times with output sent to ``/dev/null``; for further details refer to the `source