diff --git a/README.rst b/README.rst index f9707ff5..01a18016 100644 --- a/README.rst +++ b/README.rst @@ -20,9 +20,11 @@ alternative to IOStreams. Features -------- -* Two APIs: faster concatenation-based write API and slower (but still - very fast) replacement-based format API with positional arguments for - localization. +* Two APIs: faster concatenation-based `write API + `_ and slower, + but still very fast, replacement-based `format API + `_ with positional arguments + for localization. * Write API similar to the one used by IOStreams but stateless allowing faster implementation. * Format API with `format string syntax @@ -35,7 +37,7 @@ Features * Support for user-defined types. * High speed: performance of the format API is close to that of glibc's `printf `_ - and better than performance of IOStreams. See `Speed tests`_ and + and better than the performance of IOStreams. See `Speed tests`_ and `Fast integer to string conversion in C++ `_. * Small code size both in terms of source code (format consists of a single diff --git a/doc/api.rst b/doc/api.rst index 5270a68d..6ee68b5e 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -22,6 +22,11 @@ arguments in the resulting string. *args* is an argument list representing arbitrary arguments. +The `performance of the format API +`_ is close +to that of glibc's ``printf`` and better than the performance of IOStreams. +For even better speed use the `write API`_. + .. _format: .. doxygenfunction:: format(CStringRef, ArgList) @@ -136,6 +141,13 @@ a POSIX extension for positional arguments. Write API ========= +The write API provides classes for writing formatted data into character +streams. It is usually faster than the `format API`_ but, as IOStreams, +may result in larger compiled code size. The main writer class is +`~fmt::BasicMemoryWriter` which stores its output in a memory buffer and provides +direct access to it. It is possible to write create custom writers that +store output elsewhere by subclassing `~fmt::BasicWriter`. + .. doxygenclass:: fmt::BasicWriter :members: