Skip to content
A benchmark of some prominent C/C++ hash table implementations
Branch: master
Clone or download
Pull request Compare This branch is 36 commits ahead of mackstann:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gnuplot
src
.gitignore
Makefile
README
bench.sh
plot.sh

README

Introduction
============

You can read more about these benchmarks and how they were used at:

https://hpjansson.org/blag/2018/07/24/a-hash-table-re-hash/

and

https://hpjansson.org/blag/2018/08/29/what-ails-ghashtable/


How to run these benchmarks
===========================

First, some prerequisites are:

* make
* gcc and recent g++ (4.3-ish?)
* python (versions 2 and 3)
* glib
* boost
* google sparsehash
* qt
* gnuplot
* rustc

Now, run:

$ make
$ ./bench.sh
$ ./plot.sh

Your tables and charts are now in results/.

You can tweak some of the values in bench.sh to make it run faster at the
expense of less granular data.

To run the benchmark at the highest priority possible, do this:

    $ sudo nice -n-20 ionice -c1 -n0 sudo -u $USER ./bench.sh

You might also want to disable any swap files/partitions so that swapping
doesn't influence performance.  (The programs will just die if they try to
allocate too much memory.)


Copyright Information
=====================

Written by Nick Welch in 2010.
Modified by Hans Petter Jansson in 2018.
No copyright.  This work is dedicated to the public domain.
For full details, see http://creativecommons.org/publicdomain/zero/1.0/

The included khash implementation in src/khash-impl.h is copyright (c) by
Attractive Chaos <attractor@live.co.uk> and released under the MIT
license. See that file for more information.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.