Skip to content
A benchmark for standard libraries
Branch: master
Clone or download
Latest commit 792aeed Jan 4, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark @ 5e66248 update google/benchmark Nov 9, 2017
c.vs.cxx update google/benchmark Nov 9, 2017
c update google/benchmark Nov 9, 2017
compiler.vs.programmer update google/benchmark Nov 9, 2017
cxx update google/benchmark Nov 9, 2017
docs Update healthy-lto Jan 4, 2019
include typo Nov 11, 2017
test add int random numbers Dec 23, 2016
.gitmodules Setting up the std benchmark Dec 10, 2016 cmake Dec 21, 2016
.travis.yml enable small data size for travis build May 12, 2017
CMakeLists.txt enable small data size for travis build May 12, 2017
LICENSE license Dec 10, 2016 win64 May 3, 2017
TODO.txt llbit May 10, 2017
config.bat comment May 10, 2017

A benchmark for c/c++ standard library.

Build Status


  • CMake 2.8 or higher
  • Since this is a standard library benchmark, you need a compiler toolchain to benchmark.
  • A C++ compiler with C++11 support
  • google-benchmark (added as a submodule) To download the google-benchmark submodule run the following command in the project root. git submodule update --recursive --remote


mkdir $SRC/build
cd $SRC/build
cmake ..
cmake --build .
cmake --buid . --config Release

When you are compiling with clang compiler along with libcxx enabled (-DBENCHMARK_USE_LIBCXX=ON), you might get cmake error like this:

   CMake Error at benchmark/CMakeLists.txt:171 (message):
   Failed to determine the source files for the regular expression backend
  -- Configuring incomplete, errors occurred!

In that case,

export LD_LIBRARY_PATH=path-to-clang-install/lib


mkdir $SRC/build
cd $SRC/build
C:\Program Files (x86)\Microsoft Visual Studio <Version>\VC\vcvarsall.bat amd64
cmake -G"Visual Studio 15 2017 Win64" ..
cmake --build . --config release

Remember to use a generator for Win64 otherwise 32-bit binaries will be built. For more help see config.bat in the top level directory. It has some useful tricks which allows you to use git-bash for building and running the tests.

If there are errors then build the project by opening the visual studio IDE (devenv) and then try to build one component at a time.


To test the project run ctest. Running ctest will run the google-benchmark harness tests as well, so if you are only interested in runningthe c and cxx std-benchmark tests use:

ctest -L c --verbose
ctest -L cxx --verbose
ctest -C Release -L c.vs.cxx --verbose

NB: On windows the tests might not run because ctest adds each test under specific configurations. So you have to pass the appropriate configuration using the -C <config> e.g.,

ctest -C Release -L c --verbose
ctest -C Release -L cxx --verbose
ctest -C Release -L c.vs.cxx --verbose
You can’t perform that action at this time.