Comparison of decimal integers formatting algorithms
mac | linux |
---|---|
Convert vector of integer values to char
buffer.
- [input parameters] (https://github.com/ruslo/int-dec-format-tests/blob/d91111b02d64746b8665f08654bde5bf337c5c5d/source/main.cpp#L107)
- run engine
- algorithms
- fmt::FormatInt
- boost::spirit::karma
- alexandrescu
- tmpbuf (no digits counting, no reverse)
- reverse (no digits counting, reverse chars in-situ)
- counting (division free counting algorithm)
- install boost
- verify correctness:
> cmake -H. -B_builds/make-debug -DCMAKE_BUILD_TYPE=Debug
> cmake --build _builds/make-debug
> (cd _builds/make-debug && ctest -VV)
- run tests:
> cmake -H. -B_builds/make-release -DCMAKE_BUILD_TYPE=Release
> cmake --build _builds/make-release
> (cd _builds/make-release && ctest -VV)
> cmake -H. -B_builds/make-release -DCMAKE_BUILD_TYPE=Release -DBUILD32=ON
> cmake --build _builds/make-release
> (cd _builds/make-release && ctest -VV)
- Number of iterations can be reduced using
-DFAST_TEST=ON
option - If
-DLONG_TEST
option isON
, number of iterations increased and additional8Mb
test added - Set
Algo*::enabled
tofalse
to exclude algorithm from test