From c87dd746fa6b37c59a86e7bf09ce0171bffe8e9e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 5 Jul 2020 06:20:50 -0700 Subject: [PATCH] Update changelog --- ChangeLog.rst | 115 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 30 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 4c1edf53..8bc3ca3a 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -2,18 +2,31 @@ ----------- * Reduced the library size. For example, on macOS the stripped binary - statically linked with {fmt} shrank from ~368k to less than 100k: - http://www.zverovich.net/2020/05/21/reducing-library-size.html + statically linked with {fmt} `shrank from ~368k to less than 100k + `_. + +* Added sa impler and more efficient `format string compilation API + `_: + + .. code:: c++ + + #include + + // Converts 42 into std::string using the most efficient method and no + // runtime format string processing. + std::string s = fmt::format(FMT_COMPILE("{}"), 42); + + The old ``fmt::compile`` API is now deprecated. * Optimized integer formatting: ``format_to`` with format string compilation - and a stack-allocated buffer is now faster than both libc++ and libstdc++ - ``to_chars`` - (http://www.zverovich.net/2020/06/13/fast-int-to-string-revisited.html). + and a stack-allocated buffer is now `faster than to_chars` on both + libc++ and libstdc++ + `_. * Applied extern templates to improve compile times when using the core API - and ``fmt/format.h`` (`#1452 `_). - For example, on macOS with clang the compile time dropped from 2.3s to 0.3s - with ``-O2`` and from 0.6s to 0.3s with the default settings (``-O0``). + and ``fmt/format.h`` (`#1452`_). For example, on macOS with clang the compile + time of a test translation unit dropped from 2.3s to 0.3s with ``-O2`` and + from 0.6s to 0.3s with the default settings (``-O0``). Before (``-O2``):: @@ -71,7 +84,8 @@ mov DWORD PTR [rsp+16], 42 mov QWORD PTR [rsp+32], OFFSET FLAT:.LC0 mov DWORD PTR [rsp+40], 0 - call fmt::v6::vprint(fmt::v6::basic_string_view, fmt::v6::format_args) + call fmt::v6::vprint(fmt::v6::basic_string_view, + fmt::v6::format_args) xor eax, eax add rsp, 56 ret @@ -127,6 +141,7 @@ ``dynamic_format_arg_store`` (`#1655 `_, `#1663 `_, + `#1674 `_, `#1677 `_). Thanks `@vsolontsov-ll (Vladimir Solontsov) `_. @@ -153,15 +168,9 @@ is now ~40% faster (`#1685 `_). -* Added the ``FMT_OS`` CMake option to control inclusion of OS-specific APIs - in the fmt target. This can be useful for embedded platforms - (`#1654 `_, - `#1656 `_). - Thanks `@kwesolowski (Krzysztof Wesolowski) - `_. - * Improved compatibility between ``fmt::printf`` with the standard specs (`#1595 `_, + `#1682 `_, `#1683 `_, `#1687 `_, `#1699 `_). @@ -172,46 +181,74 @@ * Removed the following deprecated APIs: - * ``fmt`` and ``FMT_STRING_ALIAS`` macros - replaced by ``FMT_STRING`` + * ``FMT_STRING_ALIAS`` and ``fmt`` macros - replaced by ``FMT_STRING`` * ``fmt::basic_string_view::char_type`` - replaced by ``fmt::basic_string_view::value_type`` * ``convert_to_int`` * ``format_arg_store::types`` * ``*parse_context`` - replaced by ``*format_parse_context`` * ``FMT_DEPRECATED_INCLUDE_OS`` - * ``FMT_DEPRECATED_PERCENT`` - * ``*writer`` + * ``FMT_DEPRECATED_PERCENT`` - incompatible with ``std::format`` + * ``*writer`` - replaced by compiled format API * Renamed the ``internal`` namespace to ``detail`` (`#1538 `_). The former is still provided as an alias if the ``FMT_USE_INTERNAL`` macro is defined. +* Added the ``FMT_OS`` CMake option to control inclusion of OS-specific APIs + in the fmt target. This can be useful for embedded platforms + (`#1654 `_, + `#1656 `_). + Thanks `@kwesolowski (Krzysztof Wesolowski) + `_. + * Replaced ``FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION`` with the ``FMT_FUZZ`` macro to prevent interferring with fuzzing of projects using {fmt} (`#1650 `_). Thanks `@asraa (Asra Ali) `_. +* Fixed compatibility with emscripten + (`#1636 `_, + `#1637 `_). + Thanks `@ArthurSonzogni (Arthur Sonzogni) + `_. + * Improved documentation (`#704 `_, `#1643 `_, `#1660 `_, `#1681 `_, - `#1691 `_). + `#1691 `_, + `#1706 `_, + `#1714 `_, + `#1721 `_, + `#1739 `_, + `#1740 `_, + `#1741 `_). Thanks `@senior7515 (Alexander Gallego) `_, `@lsr0 (Lindsay Roberts) `_, `@puetzk (Kevin Puetz) `_, - `@fpelliccioni (Fernando Pelliccioni ) `_, - Alexey Kuzmenko. + `@fpelliccioni (Fernando Pelliccioni) `_, + Alexey Kuzmenko, `@jelly (jelle van der Waa) `_, + `@claremacrae (Clare Macrae) `_, + `@jiapengwen (文佳鹏) `_, + `@gsjaardema (Greg Sjaardema) `_. * Implemented various build configuration fixes and improvements - (`#1657 `_, - `#1702 `_). - Thanks `@jtojnar (Jan Tojnar) `_, - `@orivej (Orivej Desh) `_. + (`#1603 `_, + `#1657 `_, + `#1702 `_, + `#1728 `_). + Thanks `@scramsby (Scott Ramsby) `_, + `@jtojnar (Jan Tojnar) `_, + `@orivej (Orivej Desh) `_, + `@flagarde `_. * Fixed various warnings and compilation issues (`#1616 `_, + `#1620 `_, `#1622 `_, + `#1625 `_, `#1627 `_, `#1628 `_, `#1629 `_, @@ -221,10 +258,23 @@ `#1658 `_, `#1661 `_, `#1667 `_, + `#1668 `_, `#1669 `_, `#1692 `_, `#1696 `_, - `#1697 `_). + `#1697 `_, + `#1707 `_, + `#1712 `_, + `#1716 `_, + `#1722 `_, + `#1724 `_, + `#1729 `_, + `#1738 `_, + `#1742 `_, + `#1743 `_, + `#1744 `_, + `#1747 `_, + `#1750 `_). Thanks `@gsjaardema (Greg Sjaardema) `_, `@gabime (Gabi Melman) `_, `@johnor (Johan) `_, @@ -233,7 +283,12 @@ `@peterbell10 `_, `@daixtrose (Markus Werle) `_, `@petrutlucian94 (Lucian Petrut) `_, - `@Neargye (Daniil Goncharov) `_. + `@Neargye (Daniil Goncharov) `_, + `@ambitslix (Attila M. Szilagyi) `_, + `@gabime (Gabi Melman) `_, + `@erthink (Leonid Yuriev) `_, + `@tohammer (Tobias Hammer) `_, + `@0x8000-0000 (Florin Iucha) `_. 6.2.1 - 2020-05-09 ------------------ @@ -834,8 +889,8 @@ #include auto f = fmt::compile("{}"); - std::string s = fmt::format(f, 42); // can be called multiple times to format - // different values + std::string s = fmt::format(f, 42); // can be called multiple times to + // format different values // s == "42" It moves the cost of parsing a format string outside of the format function