hashbench 1.0.1

A simple benchmark for digests included in phobos lib


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

HashBench

This is a benchmark program for the phobos builtin digests and xxhash3 v1.x.x

How to run

It can be compiled with all D compilers (at the moment of writting).

It output the benchmark results.

Use

or

or


Use configurations to build the different variants of the code:

* local-dev - a local copy of the xxh.d source (development aid)
* dub-package - use the xxhash3 DUB package
* phobos-dev - Use std.digest.xxh . You must use the beta DMD compiler in this case

## Outputs

$ dub run --compiler=ldc2 -b release -c dub-package -- -h

Starting Performing "release" build using ldc2 for x86_64.
Building xxhash3 0.0.5: building configuration [library]
Building hashbench 0.0.3+commit.1.ge3d58f0: building configuration [dub-package]

Pre-build Running commands

 Linking hashbench
 Running hashbench -h

Some information about the program. -v --verbose Verbose outputs (WIP) -t --test Select a test out of [all, crc32, crc64ecma, crc64iso, xxh32, xxh64, xxh364, xxh3128, murmur32, murmur128, md5, sha256] --max-duration Set time limit for each test (seconds) -w --writecsv Write CSV files -h --help This help information.

$ dub run --compiler=ldc2 -b release -c dub-package --

Starting Performing "release" build using ldc2 for x86_64.

Up-to-date xxhash3 0.0.5: target for configuration [library] is up to date. Up-to-date hashbench 0.0.3+commit.1.ge3d58f0: target for configuration [dub-package] is up to date.

Finished To force a rebuild of up-to-date targets, run again with --force
 Running hashbench

A benchmark utility for the phobos digests.

Build is v0.0.3-1-ge3d58f0

Time Limit per test is 180

  test_crc32.test_crc32: Average  3202.729248 MB/s

testcrc64ecma.testcrc64ecma: Average 2165.348877 MB/s

test_crc64iso.test_crc64iso: Average  2192.543457 MB/s
      test_xxh32.test_xxh32: Average  8971.233398 MB/s
      test_xxh64.test_xxh64: Average 18021.412109 MB/s
  test_xxh3_64.test_xxh3_64: Average 14651.549805 MB/s
test_xxh3_128.test_xxh3_128: Average 13786.886719 MB/s
    test_murmur32.test_mm32: Average  4209.063965 MB/s
  test_murmur128.test_mm128: Average  7225.240723 MB/s
          test_md5.test_md5: Average   753.880615 MB/s
          test_sha.test_sha: Average   392.039215 MB/s

Total test duration: 11 secs, 336 ms, 704 μs, and 6 hnsecs

Authors:
  • Carsten Schlote
Dependencies:
xxhash3
Versions:
1.0.1 2025-Sep-19
1.0.0 2025-Sep-19
0.0.3 2022-May-29
0.0.2 2022-May-26
0.0.1 2022-May-25
Show all 7 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 12 downloads total

Score:
0.0
Short URL:
hashbench.dub.pm