GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fmtlib/format-benchmark: A collection of formatting benchmarks

BranchesTags
Open more actions menu

Latest commit

 

History

256 Commits
256 Commits

Folders and files

NameName
Last commit message
Last commit date
benchmark @ a6ad7fb
benchmark @ a6ad7fb
 
 
fmt @ 6226bc7
fmt @ 6226bc7
 
 
src
src
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CMakeLists.txt
CMakeLists.txt
 
 
README.rst
README.rst
 
 
bloat-test.py
bloat-test.py
 
 
variadic-test.py
variadic-test.py
 
 

Repository files navigation

A collection of formatting benchmarks

  • Speed, compile time and code bloat tests from tinyformat.
  • int-benchmark: decimal integer to string conversion benchmark from Boost Karma
  • itoa-benchmark: decimal integer to string conversion benchmark by Milo Yip. See src/itoa-benchmark/readme.md.

Building and running int-benchmark:

cmake .
make
./int-benchmark

Alternatively (requires ninja):

cmake -G Ninja .
ninja int-benchmark
./int-benchmark

Sample results on macOS with clang and libc++:

2020-06-25 18:35:12
Running ./int-benchmark
Run on (8 X 2800 MHz CPU s)
CPU Caches:
  L1 Data 32K (x4)
  L1 Instruction 32K (x4)
  L2 Unified 262K (x4)
  L3 Unified 8388K (x1)
Load Average: 3.05, 2.27, 2.05
--------------------------------------------------------------------------------
Benchmark                      Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------
sprintf                 62015560 ns     61939300 ns           10 items_per_second=16.1448M/s
std_ostringstream      153347073 ns    153167000 ns            4 items_per_second=6.52882M/s
std_to_string           15058924 ns     15052045 ns           44 items_per_second=66.4362M/s
std_to_chars            10995660 ns     10991238 ns           63 items_per_second=90.9816M/s
fmt_to_string           11909200 ns     11905632 ns           57 items_per_second=83.9939M/s
fmt_format_runtime      17071781 ns     17062878 ns           41 items_per_second=58.6068M/s
fmt_format_compile      11897635 ns     11893517 ns           58 items_per_second=84.0794M/s
fmt_format_to_runtime   13539784 ns     13534137 ns           51 items_per_second=73.8872M/s
fmt_format_to_compile    8941199 ns      8937675 ns           77 items_per_second=111.886M/s
fmt_format_int           8721323 ns      8718253 ns           79 items_per_second=114.702M/s
boost_lexical_cast      29685237 ns     29668455 ns           22 items_per_second=33.7058M/s
boost_format           315875676 ns    315739000 ns            2 items_per_second=3.16717M/s
boost_karma_generate    12138668 ns     12134518 ns           56 items_per_second=82.4095M/s
voigt_itostr            20177849 ns     19994243 ns           37 items_per_second=50.0144M/s
u2985907                 9445288 ns      9427174 ns           69 items_per_second=106.076M/s
decimal_from            13009338 ns     12952232 ns           56 items_per_second=77.2068M/s
stout_ltoa              39336210 ns     39325000 ns           18 items_per_second=25.4291M/s

About

A collection of formatting benchmarks

Resources

Readme
Activity
Custom properties

Stars

54 stars

Watchers

7 watching

Forks

25 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.