From ced8aa8c9ed22067026e67a931f1f05bf8ddceab Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 10 Mar 2019 12:07:57 -0700 Subject: [PATCH] Update readme --- README.rst | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index e8a38020..ed0e4e51 100644 --- a/README.rst +++ b/README.rst @@ -341,14 +341,6 @@ Benchmarks Speed tests ~~~~~~~~~~~ -The following speed tests results were generated by building -``tinyformat_test.cpp`` on Ubuntu GNU/Linux 14.04.1 with -``g++-4.8.2 -O3 -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 2000000 times with output sent to ``/dev/null``; for -further details see the `source -`_. - ================= ============= =========== Library Method Run Time, s ================= ============= =========== @@ -360,13 +352,14 @@ Boost Format 1.54 boost::format 7.98 Folly Format folly::format 2.23 ================= ============= =========== -As you can see ``boost::format`` is much slower than the alternative methods; this -is confirmed by `other tests `_. -Tinyformat is quite good coming close to IOStreams. Unfortunately tinyformat -cannot be faster than the IOStreams because it uses them internally. -Performance of fmt is close to that of printf, being `faster than printf on integer -formatting `_, -but slower on floating-point formatting which dominates this benchmark. +{fmt} is the fastest of the benchmarked methods, ~17% faster than `printf`. + +The above results were generated by building ``tinyformat_test.cpp`` on macOS +10.14.3 with ``clang++ -O3 -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 2000000 times with output sent to ``/dev/null``; for +further details see the `source +`_. Compile time and code bloat ~~~~~~~~~~~~~~~~~~~~~~~~~~~