Coder Social home page Coder Social logo

hashbench's Introduction

Compact Hash Table Benchmark

A C++17 hash table benchmark, covering

Compilation

The external requirements are available as git submodules.

git submodule init
git submodule update

Dependencies

  • Command line tools
    • cmake
    • make
    • a C++17 compiler like gcc or clang
    • glog for the tudocomp sparse compact hash tables
    • celero for benchmarking
    • gtest (optional) for tests

Benchmarks

We use tudostats for measuring time and memory usage. The output is a JSON file.

Global compile flags

Compile flags can be modified in the file CMakeLists.txt. The compile flag -DSTATS_DISABLED=1 disables tudostats. When tudostats are enabled:

  • the flag -DMALLOC_DISABLED=1 disables memory measurement, which can speed up the benchmarks.
  • the flag -DPRINT_STATS lets tudostats print statistics of the separate chaining hash tables.

The hash tables to use can be enabled/disabled in defs.hpp.

randomcopy n v

Fills hash tables with n key-value pairs with 32-bit keys and v bit values. v can range between 1 and 8. If you need larger value bit widths, you need to specify a larger integer type for the values (default_value_type in defs.hpp).

reservecopy n v

The same as randomcopy with the difference that the hash table know in advance the minimum size 2^{k-16}, where k is the smallest power of two larger or equal to n. This allows compact hash tables to allocate buckets. The mock_key_type in reservecopy.cpp is the type in which a quotient can be stored.

microbench

Measures the time for insertion, deletions, successful and unsuccesful queries. Each experiment is conducted multiple times, and the average time with deviation is returned. Needs the celero library installed.

hashbench's People

Contributors

kimundi avatar koeppl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hashbench's Issues

restructure code

It would be nice to have a wrapper header file for each hash table we add, and a list where the user can choose which hash tables to include for the benchmarks.
Regrading the benchmarks, I would like to add k-mer counting from a file (for instance using a sliding window to also use the erase function).
Also, a Markov chain source should be interesting, instead of using just a uniform random source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.