[LLVMdev] Proposed implementation of N3333 hashing interfaces for LLVM (and possible libc++)
Chandler Carruth
chandlerc at google.com
Tue Feb 28 03:34:26 PST 2012
Hello folks,
TL;DR: This is my proposed hashing interface based on a proposed standard
hashing interface. It also is implemented with a much faster and higher
quality algorithm than the current one. This is an *early draft* of the
code, looking for initial feedback.
There has been recent interest in improving the quality and consistency of
LLVM's approach to hashing. In particular, getting a single API and a high
quality implementation in one place that other parts of the codebase can
use to hash custom data structures. As it happens, Jeffrey Yasskin and I
have been working on a proposal with similar goals to the the C++ standard
library[1].
----
API concerns
This interface is a bit heavyweight for LLVM's needs alone. It was designed
with the input of Matt Austern, and two hashing experts, Geoff Pike and
Austin Appleby, to be as easy to use and simple for user-defined types as
possible, while composing cleanly with the STL and other C++ standard
library concepts.
That said, we are working actively on getting this (quite possibly modified
during the process) into the standard, and so it seems reasonable to just
implement what we expect people to have available with their standard
library. I'm planning to continue working on this, and hope to contribute
it to libc++ to implement the proposed library extension when appropriate
(both the code is sufficiently mature, and the committee/Howard is happy
with the state of the interface).
The attached implementation is, I must emphasize, an early draft. I'm
mostly looking for feedback, thoughts, concerns, etc. In particular, I'm
not satisfied with the organization of the header file. There are a *lot*
of implementation details. Ideas on the best organization welcome,
otherwise I'll try to forward declare and shuffle the user-facing functions
to at least be declared toward the top.
Howard, high-level feedback from you would be particularly appreciated as I
would love to contribute this to libc++ when the time is right.
I'm hoping to package up tests and convert clients to the new interface
tomorrow.
----
Implementation concerns
The current hashing implementation simply isn't high-enough quality. I'm
working on extensive quality testing reports using the SMHasher test suite
which uses a large number of keysets known to cause problems for real-world
hashing algorithms in real-world applications. The current implementation
is used to hash potentially long vectors of data, and so it is very likely
to be subject to the collision patterns being tested for.
This isn't terribly surprising -- murmur2, the algorithm it is based upon
has some known weaknesses here. Also, my testing seems to indicate some
aspects of the adaptation made these significantly worse, but I'm not
entirely certain. I'm still digging there.
There are now a few hashing algorithms that do significantly better in both
performance and hash quality: Murmur3, CityHash, and SpookyHash. Of these,
CityHash and SpookyHash are significantly faster than Murmur3, both for
large keys and for very small keys.
My implementation is a variation of CityHash (the original isn't suitable
for the interface) which is as high quality or higher quality, and happens
to be still faster for large keys and no slower for small keys. SpookyHash
is still faster for large keys, but is slower for small keys, and those
dominate LLVM's (and typical application's) hash tables.
In particular the implementation I propose *scales* very well through the
small (8-byte) to medium (64- to 128-byte) key space that seems not unheard
of for folding sets and other LLVM data structures. For example, it should
be faster than FoldingSet's current solution for 2-pointers worth of key by
just a bit, but by the time there are 8-pointers worth of key, it is over
2x faster.
That said, I think there remain two significant implementation problems I
want to solve in the near-term:
1) Performance of hashing very small keys should be better than it is.
8-bytes and smaller have room for improvement.
2) Performance on 32-bit hosts, ARM, and Atom hosts needs to be measured.
I've not done this yet, and it may necessitate either changes to the
implementation, or alternate implementations on those hosts.
Again, as I'm hoping this will be the standard hashing implementation for
libc++ and others going forward, I'm planning on doing this legwork anyways.
I'll try to post the rest of my benchmarks and a nice chart, 32-bit
benchmarks, some compile-time benchmarks of various pieces of the system,
and the quality evaluation of these algorithms tomorrow.
----
1: http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2012/n3333.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120228/f5d1b153/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing bernstein (Bernstein, 32-bit)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 0.279 bytes/cycle - 603.67 MiB/sec @ 2.268 ghz
Alignment 1 - 0.279 bytes/cycle - 603.65 MiB/sec @ 2.268 ghz
Alignment 2 - 0.279 bytes/cycle - 603.66 MiB/sec @ 2.268 ghz
Alignment 3 - 0.279 bytes/cycle - 603.66 MiB/sec @ 2.268 ghz
Alignment 4 - 0.279 bytes/cycle - 603.65 MiB/sec @ 2.268 ghz
Alignment 5 - 0.279 bytes/cycle - 603.65 MiB/sec @ 2.268 ghz
Alignment 6 - 0.279 bytes/cycle - 603.65 MiB/sec @ 2.268 ghz
Alignment 7 - 0.279 bytes/cycle - 603.65 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 2.50 cycles/hash 1.10 nanos/hash
Small key speed test - 2-byte keys - 4.77 cycles/hash 2.10 nanos/hash
Small key speed test - 3-byte keys - 7.79 cycles/hash 3.43 nanos/hash
Small key speed test - 4-byte keys - 7.78 cycles/hash 3.43 nanos/hash
Small key speed test - 5-byte keys - 9.25 cycles/hash 4.07 nanos/hash
Small key speed test - 6-byte keys - 12.23 cycles/hash 5.39 nanos/hash
Small key speed test - 7-byte keys - 15.24 cycles/hash 6.71 nanos/hash
Small key speed test - 8-byte keys - 21.45 cycles/hash 9.45 nanos/hash
Small key speed test - 9-byte keys - 25.03 cycles/hash 11.03 nanos/hash
Small key speed test - 10-byte keys - 28.61 cycles/hash 12.61 nanos/hash
Small key speed test - 11-byte keys - 32.20 cycles/hash 14.19 nanos/hash
Small key speed test - 12-byte keys - 30.35 cycles/hash 13.37 nanos/hash
Small key speed test - 13-byte keys - 39.30 cycles/hash 17.32 nanos/hash
Small key speed test - 14-byte keys - 42.91 cycles/hash 18.91 nanos/hash
Small key speed test - 15-byte keys - 46.67 cycles/hash 20.57 nanos/hash
Small key speed test - 16-byte keys - 52.23 cycles/hash 23.02 nanos/hash
Small key speed test - 18-byte keys - 61.57 cycles/hash 27.14 nanos/hash
Small key speed test - 20-byte keys - 66.62 cycles/hash 29.37 nanos/hash
Small key speed test - 22-byte keys - 74.32 cycles/hash 32.76 nanos/hash
Small key speed test - 24-byte keys - 78.95 cycles/hash 34.80 nanos/hash
Small key speed test - 28-byte keys - 93.78 cycles/hash 41.34 nanos/hash
Small key speed test - 32-byte keys - 108.05 cycles/hash 47.64 nanos/hash
Small key speed test - 36-byte keys - 122.46 cycles/hash 53.99 nanos/hash
Small key speed test - 40-byte keys - 136.66 cycles/hash 60.25 nanos/hash
Small key speed test - 48-byte keys - 165.25 cycles/hash 72.85 nanos/hash
Small key speed test - 56-byte keys - 193.87 cycles/hash 85.48 nanos/hash
Small key speed test - 64-byte keys - 219.79 cycles/hash 96.90 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Hashing.h
Type: text/x-chdr
Size: 27596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120228/f5d1b153/attachment.h>
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing superfast (Paul Hsieh's SuperFastHash)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 0.558 bytes/cycle - 1206.82 MiB/sec @ 2.268 ghz
Alignment 1 - 0.557 bytes/cycle - 1204.25 MiB/sec @ 2.268 ghz
Alignment 2 - 0.558 bytes/cycle - 1207.09 MiB/sec @ 2.268 ghz
Alignment 3 - 0.557 bytes/cycle - 1204.47 MiB/sec @ 2.268 ghz
Alignment 4 - 0.558 bytes/cycle - 1206.87 MiB/sec @ 2.268 ghz
Alignment 5 - 0.557 bytes/cycle - 1204.24 MiB/sec @ 2.268 ghz
Alignment 6 - 0.558 bytes/cycle - 1207.08 MiB/sec @ 2.268 ghz
Alignment 7 - 0.557 bytes/cycle - 1204.48 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 23.21 cycles/hash 10.23 nanos/hash
Small key speed test - 2-byte keys - 24.10 cycles/hash 10.62 nanos/hash
Small key speed test - 3-byte keys - 24.14 cycles/hash 10.64 nanos/hash
Small key speed test - 4-byte keys - 25.03 cycles/hash 11.03 nanos/hash
Small key speed test - 5-byte keys - 31.29 cycles/hash 13.79 nanos/hash
Small key speed test - 6-byte keys - 31.24 cycles/hash 13.77 nanos/hash
Small key speed test - 7-byte keys - 32.17 cycles/hash 14.18 nanos/hash
Small key speed test - 8-byte keys - 32.16 cycles/hash 14.17 nanos/hash
Small key speed test - 9-byte keys - 38.44 cycles/hash 16.94 nanos/hash
Small key speed test - 10-byte keys - 38.49 cycles/hash 16.96 nanos/hash
Small key speed test - 11-byte keys - 37.55 cycles/hash 16.55 nanos/hash
Small key speed test - 12-byte keys - 39.33 cycles/hash 17.34 nanos/hash
Small key speed test - 13-byte keys - 46.59 cycles/hash 20.54 nanos/hash
Small key speed test - 14-byte keys - 45.61 cycles/hash 20.10 nanos/hash
Small key speed test - 15-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 16-byte keys - 46.48 cycles/hash 20.49 nanos/hash
Small key speed test - 18-byte keys - 55.42 cycles/hash 24.43 nanos/hash
Small key speed test - 20-byte keys - 53.63 cycles/hash 23.64 nanos/hash
Small key speed test - 22-byte keys - 59.88 cycles/hash 26.40 nanos/hash
Small key speed test - 24-byte keys - 60.78 cycles/hash 26.79 nanos/hash
Small key speed test - 28-byte keys - 67.93 cycles/hash 29.94 nanos/hash
Small key speed test - 32-byte keys - 74.20 cycles/hash 32.71 nanos/hash
Small key speed test - 36-byte keys - 82.23 cycles/hash 36.25 nanos/hash
Small key speed test - 40-byte keys - 89.38 cycles/hash 39.40 nanos/hash
Small key speed test - 48-byte keys - 98.97 cycles/hash 43.63 nanos/hash
Small key speed test - 56-byte keys - 117.99 cycles/hash 52.02 nanos/hash
Small key speed test - 64-byte keys - 133.12 cycles/hash 58.69 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing llvm (LLVM Hashing)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 0.888 bytes/cycle - 1921.36 MiB/sec @ 2.268 ghz
Alignment 1 - 0.883 bytes/cycle - 1910.54 MiB/sec @ 2.268 ghz
Alignment 2 - 0.883 bytes/cycle - 1910.54 MiB/sec @ 2.268 ghz
Alignment 3 - 0.883 bytes/cycle - 1910.55 MiB/sec @ 2.268 ghz
Alignment 4 - 0.889 bytes/cycle - 1921.82 MiB/sec @ 2.268 ghz
Alignment 5 - 0.883 bytes/cycle - 1910.54 MiB/sec @ 2.268 ghz
Alignment 6 - 0.883 bytes/cycle - 1910.57 MiB/sec @ 2.268 ghz
Alignment 7 - 0.883 bytes/cycle - 1910.53 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 41.99 cycles/hash 18.51 nanos/hash
Small key speed test - 2-byte keys - 42.00 cycles/hash 18.51 nanos/hash
Small key speed test - 3-byte keys - 42.90 cycles/hash 18.91 nanos/hash
Small key speed test - 4-byte keys - 16.77 cycles/hash 7.39 nanos/hash
Small key speed test - 5-byte keys - 47.37 cycles/hash 20.88 nanos/hash
Small key speed test - 6-byte keys - 47.38 cycles/hash 20.88 nanos/hash
Small key speed test - 7-byte keys - 48.27 cycles/hash 21.28 nanos/hash
Small key speed test - 8-byte keys - 25.93 cycles/hash 11.43 nanos/hash
Small key speed test - 9-byte keys - 53.57 cycles/hash 23.61 nanos/hash
Small key speed test - 10-byte keys - 53.63 cycles/hash 23.64 nanos/hash
Small key speed test - 11-byte keys - 55.42 cycles/hash 24.43 nanos/hash
Small key speed test - 12-byte keys - 30.39 cycles/hash 13.39 nanos/hash
Small key speed test - 13-byte keys - 59.00 cycles/hash 26.01 nanos/hash
Small key speed test - 14-byte keys - 58.99 cycles/hash 26.00 nanos/hash
Small key speed test - 15-byte keys - 59.89 cycles/hash 26.40 nanos/hash
Small key speed test - 16-byte keys - 30.18 cycles/hash 13.30 nanos/hash
Small key speed test - 18-byte keys - 63.45 cycles/hash 27.97 nanos/hash
Small key speed test - 20-byte keys - 39.33 cycles/hash 17.34 nanos/hash
Small key speed test - 22-byte keys - 67.93 cycles/hash 29.95 nanos/hash
Small key speed test - 24-byte keys - 44.70 cycles/hash 19.70 nanos/hash
Small key speed test - 28-byte keys - 49.17 cycles/hash 21.68 nanos/hash
Small key speed test - 32-byte keys - 52.80 cycles/hash 23.27 nanos/hash
Small key speed test - 36-byte keys - 56.33 cycles/hash 24.83 nanos/hash
Small key speed test - 40-byte keys - 61.67 cycles/hash 27.18 nanos/hash
Small key speed test - 48-byte keys - 71.18 cycles/hash 31.38 nanos/hash
Small key speed test - 56-byte keys - 93.30 cycles/hash 41.13 nanos/hash
Small key speed test - 64-byte keys - 103.73 cycles/hash 45.73 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing Murmur2A (MurmurHash2A for x86, 32-bit)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 1.093 bytes/cycle - 2363.78 MiB/sec @ 2.268 ghz
Alignment 1 - 1.005 bytes/cycle - 2173.73 MiB/sec @ 2.268 ghz
Alignment 2 - 1.005 bytes/cycle - 2173.72 MiB/sec @ 2.268 ghz
Alignment 3 - 1.005 bytes/cycle - 2173.82 MiB/sec @ 2.268 ghz
Alignment 4 - 1.093 bytes/cycle - 2363.53 MiB/sec @ 2.268 ghz
Alignment 5 - 1.005 bytes/cycle - 2174.42 MiB/sec @ 2.268 ghz
Alignment 6 - 1.005 bytes/cycle - 2174.40 MiB/sec @ 2.268 ghz
Alignment 7 - 1.005 bytes/cycle - 2174.42 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 20.53 cycles/hash 9.05 nanos/hash
Small key speed test - 2-byte keys - 21.45 cycles/hash 9.45 nanos/hash
Small key speed test - 3-byte keys - 22.35 cycles/hash 9.85 nanos/hash
Small key speed test - 4-byte keys - 26.82 cycles/hash 11.82 nanos/hash
Small key speed test - 5-byte keys - 28.61 cycles/hash 12.61 nanos/hash
Small key speed test - 6-byte keys - 29.48 cycles/hash 12.99 nanos/hash
Small key speed test - 7-byte keys - 29.50 cycles/hash 13.00 nanos/hash
Small key speed test - 8-byte keys - 30.39 cycles/hash 13.39 nanos/hash
Small key speed test - 9-byte keys - 31.28 cycles/hash 13.79 nanos/hash
Small key speed test - 10-byte keys - 32.15 cycles/hash 14.17 nanos/hash
Small key speed test - 11-byte keys - 32.19 cycles/hash 14.19 nanos/hash
Small key speed test - 12-byte keys - 33.06 cycles/hash 14.57 nanos/hash
Small key speed test - 13-byte keys - 37.54 cycles/hash 16.55 nanos/hash
Small key speed test - 14-byte keys - 38.45 cycles/hash 16.95 nanos/hash
Small key speed test - 15-byte keys - 39.32 cycles/hash 17.33 nanos/hash
Small key speed test - 16-byte keys - 37.54 cycles/hash 16.55 nanos/hash
Small key speed test - 18-byte keys - 39.33 cycles/hash 17.34 nanos/hash
Small key speed test - 20-byte keys - 39.33 cycles/hash 17.34 nanos/hash
Small key speed test - 22-byte keys - 42.91 cycles/hash 18.91 nanos/hash
Small key speed test - 24-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 28-byte keys - 49.15 cycles/hash 21.66 nanos/hash
Small key speed test - 32-byte keys - 53.63 cycles/hash 23.64 nanos/hash
Small key speed test - 36-byte keys - 55.41 cycles/hash 24.43 nanos/hash
Small key speed test - 40-byte keys - 60.78 cycles/hash 26.79 nanos/hash
Small key speed test - 48-byte keys - 69.72 cycles/hash 30.73 nanos/hash
Small key speed test - 56-byte keys - 77.20 cycles/hash 34.03 nanos/hash
Small key speed test - 64-byte keys - 101.61 cycles/hash 44.80 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing Murmur3A (MurmurHash3 for x86, 32-bit)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 0.819 bytes/cycle - 1771.02 MiB/sec @ 2.268 ghz
Alignment 1 - 0.808 bytes/cycle - 1747.14 MiB/sec @ 2.268 ghz
Alignment 2 - 0.808 bytes/cycle - 1747.18 MiB/sec @ 2.268 ghz
Alignment 3 - 0.808 bytes/cycle - 1747.21 MiB/sec @ 2.268 ghz
Alignment 4 - 0.819 bytes/cycle - 1770.55 MiB/sec @ 2.268 ghz
Alignment 5 - 0.808 bytes/cycle - 1747.06 MiB/sec @ 2.268 ghz
Alignment 6 - 0.808 bytes/cycle - 1747.11 MiB/sec @ 2.268 ghz
Alignment 7 - 0.808 bytes/cycle - 1747.07 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 27.19 cycles/hash 11.98 nanos/hash
Small key speed test - 2-byte keys - 30.38 cycles/hash 13.39 nanos/hash
Small key speed test - 3-byte keys - 31.31 cycles/hash 13.80 nanos/hash
Small key speed test - 4-byte keys - 28.11 cycles/hash 12.39 nanos/hash
Small key speed test - 5-byte keys - 33.08 cycles/hash 14.58 nanos/hash
Small key speed test - 6-byte keys - 31.76 cycles/hash 14.00 nanos/hash
Small key speed test - 7-byte keys - 38.44 cycles/hash 16.94 nanos/hash
Small key speed test - 8-byte keys - 30.18 cycles/hash 13.30 nanos/hash
Small key speed test - 9-byte keys - 38.44 cycles/hash 16.94 nanos/hash
Small key speed test - 10-byte keys - 40.25 cycles/hash 17.74 nanos/hash
Small key speed test - 11-byte keys - 44.75 cycles/hash 19.72 nanos/hash
Small key speed test - 12-byte keys - 39.33 cycles/hash 17.33 nanos/hash
Small key speed test - 13-byte keys - 41.12 cycles/hash 18.12 nanos/hash
Small key speed test - 14-byte keys - 43.99 cycles/hash 19.39 nanos/hash
Small key speed test - 15-byte keys - 49.16 cycles/hash 21.67 nanos/hash
Small key speed test - 16-byte keys - 43.79 cycles/hash 19.30 nanos/hash
Small key speed test - 18-byte keys - 51.84 cycles/hash 22.85 nanos/hash
Small key speed test - 20-byte keys - 47.34 cycles/hash 20.87 nanos/hash
Small key speed test - 22-byte keys - 57.21 cycles/hash 25.22 nanos/hash
Small key speed test - 24-byte keys - 53.55 cycles/hash 23.60 nanos/hash
Small key speed test - 28-byte keys - 58.13 cycles/hash 25.63 nanos/hash
Small key speed test - 32-byte keys - 64.35 cycles/hash 28.37 nanos/hash
Small key speed test - 36-byte keys - 69.72 cycles/hash 30.73 nanos/hash
Small key speed test - 40-byte keys - 72.71 cycles/hash 32.05 nanos/hash
Small key speed test - 48-byte keys - 82.43 cycles/hash 36.34 nanos/hash
Small key speed test - 56-byte keys - 94.75 cycles/hash 41.77 nanos/hash
Small key speed test - 64-byte keys - 105.47 cycles/hash 46.50 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing City64 (Google CityHash128WithSeed)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 2.593 bytes/cycle - 5609.20 MiB/sec @ 2.268 ghz
Alignment 1 - 2.591 bytes/cycle - 5603.16 MiB/sec @ 2.268 ghz
Alignment 2 - 2.591 bytes/cycle - 5603.24 MiB/sec @ 2.268 ghz
Alignment 3 - 2.591 bytes/cycle - 5603.13 MiB/sec @ 2.268 ghz
Alignment 4 - 2.590 bytes/cycle - 5602.73 MiB/sec @ 2.268 ghz
Alignment 5 - 2.590 bytes/cycle - 5603.08 MiB/sec @ 2.268 ghz
Alignment 6 - 2.591 bytes/cycle - 5603.13 MiB/sec @ 2.268 ghz
Alignment 7 - 2.590 bytes/cycle - 5602.88 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 36.62 cycles/hash 16.14 nanos/hash
Small key speed test - 2-byte keys - 36.63 cycles/hash 16.15 nanos/hash
Small key speed test - 3-byte keys - 36.73 cycles/hash 16.19 nanos/hash
Small key speed test - 4-byte keys - 41.12 cycles/hash 18.12 nanos/hash
Small key speed test - 5-byte keys - 41.12 cycles/hash 18.12 nanos/hash
Small key speed test - 6-byte keys - 41.12 cycles/hash 18.12 nanos/hash
Small key speed test - 7-byte keys - 41.11 cycles/hash 18.12 nanos/hash
Small key speed test - 8-byte keys - 41.12 cycles/hash 18.12 nanos/hash
Small key speed test - 9-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 10-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 11-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 12-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 13-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 14-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 15-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 16-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 18-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 20-byte keys - 44.70 cycles/hash 19.70 nanos/hash
Small key speed test - 22-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 24-byte keys - 42.91 cycles/hash 18.91 nanos/hash
Small key speed test - 28-byte keys - 42.91 cycles/hash 18.91 nanos/hash
Small key speed test - 32-byte keys - 42.91 cycles/hash 18.91 nanos/hash
Small key speed test - 36-byte keys - 50.98 cycles/hash 22.47 nanos/hash
Small key speed test - 40-byte keys - 51.02 cycles/hash 22.49 nanos/hash
Small key speed test - 48-byte keys - 50.93 cycles/hash 22.45 nanos/hash
Small key speed test - 56-byte keys - 50.96 cycles/hash 22.46 nanos/hash
Small key speed test - 64-byte keys - 50.95 cycles/hash 22.46 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing std64 (LLVM Standard-baed Hashing)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 3.077 bytes/cycle - 6655.33 MiB/sec @ 2.268 ghz
Alignment 1 - 3.048 bytes/cycle - 6591.80 MiB/sec @ 2.268 ghz
Alignment 2 - 3.047 bytes/cycle - 6590.83 MiB/sec @ 2.268 ghz
Alignment 3 - 3.047 bytes/cycle - 6590.68 MiB/sec @ 2.268 ghz
Alignment 4 - 3.046 bytes/cycle - 6587.97 MiB/sec @ 2.268 ghz
Alignment 5 - 3.046 bytes/cycle - 6588.15 MiB/sec @ 2.268 ghz
Alignment 6 - 3.046 bytes/cycle - 6588.33 MiB/sec @ 2.268 ghz
Alignment 7 - 3.046 bytes/cycle - 6588.16 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 41.99 cycles/hash 18.51 nanos/hash
Small key speed test - 2-byte keys - 42.00 cycles/hash 18.51 nanos/hash
Small key speed test - 3-byte keys - 42.00 cycles/hash 18.51 nanos/hash
Small key speed test - 4-byte keys - 40.22 cycles/hash 17.73 nanos/hash
Small key speed test - 5-byte keys - 40.21 cycles/hash 17.72 nanos/hash
Small key speed test - 6-byte keys - 40.22 cycles/hash 17.73 nanos/hash
Small key speed test - 7-byte keys - 40.23 cycles/hash 17.73 nanos/hash
Small key speed test - 8-byte keys - 40.24 cycles/hash 17.73 nanos/hash
Small key speed test - 9-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 10-byte keys - 44.70 cycles/hash 19.70 nanos/hash
Small key speed test - 11-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 12-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 13-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 14-byte keys - 44.70 cycles/hash 19.70 nanos/hash
Small key speed test - 15-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 16-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 18-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 20-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 22-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 24-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 28-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 32-byte keys - 50.95 cycles/hash 22.46 nanos/hash
Small key speed test - 36-byte keys - 58.75 cycles/hash 25.90 nanos/hash
Small key speed test - 40-byte keys - 58.99 cycles/hash 26.01 nanos/hash
Small key speed test - 48-byte keys - 58.99 cycles/hash 26.00 nanos/hash
Small key speed test - 56-byte keys - 58.99 cycles/hash 26.00 nanos/hash
Small key speed test - 64-byte keys - 59.00 cycles/hash 26.01 nanos/hash
-------------------------------------------------------------------------------
-------------- next part --------------
-------------------------------------------------------------------------------
--- Testing spooky64 (SpookyHash 64-bit)
[[[ Speed Tests ]]]
Bulk speed test - 262144-byte keys
Alignment 0 - 3.305 bytes/cycle - 7147.92 MiB/sec @ 2.268 ghz
Alignment 1 - 3.278 bytes/cycle - 7090.76 MiB/sec @ 2.268 ghz
Alignment 2 - 3.279 bytes/cycle - 7091.50 MiB/sec @ 2.268 ghz
Alignment 3 - 3.278 bytes/cycle - 7091.10 MiB/sec @ 2.268 ghz
Alignment 4 - 3.279 bytes/cycle - 7091.38 MiB/sec @ 2.268 ghz
Alignment 5 - 3.279 bytes/cycle - 7091.71 MiB/sec @ 2.268 ghz
Alignment 6 - 3.279 bytes/cycle - 7091.72 MiB/sec @ 2.268 ghz
Alignment 7 - 3.278 bytes/cycle - 7090.54 MiB/sec @ 2.268 ghz
Small key speed test - 1-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 2-byte keys - 45.61 cycles/hash 20.10 nanos/hash
Small key speed test - 3-byte keys - 46.48 cycles/hash 20.49 nanos/hash
Small key speed test - 4-byte keys - 43.80 cycles/hash 19.31 nanos/hash
Small key speed test - 5-byte keys - 45.58 cycles/hash 20.09 nanos/hash
Small key speed test - 6-byte keys - 47.37 cycles/hash 20.88 nanos/hash
Small key speed test - 7-byte keys - 47.39 cycles/hash 20.89 nanos/hash
Small key speed test - 8-byte keys - 45.57 cycles/hash 20.09 nanos/hash
Small key speed test - 9-byte keys - 46.48 cycles/hash 20.49 nanos/hash
Small key speed test - 10-byte keys - 47.37 cycles/hash 20.88 nanos/hash
Small key speed test - 11-byte keys - 47.37 cycles/hash 20.88 nanos/hash
Small key speed test - 12-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 13-byte keys - 44.69 cycles/hash 19.70 nanos/hash
Small key speed test - 14-byte keys - 47.38 cycles/hash 20.88 nanos/hash
Small key speed test - 15-byte keys - 48.27 cycles/hash 21.28 nanos/hash
Small key speed test - 16-byte keys - 69.72 cycles/hash 30.73 nanos/hash
Small key speed test - 18-byte keys - 71.25 cycles/hash 31.41 nanos/hash
Small key speed test - 20-byte keys - 69.72 cycles/hash 30.73 nanos/hash
Small key speed test - 22-byte keys - 71.17 cycles/hash 31.38 nanos/hash
Small key speed test - 24-byte keys - 71.93 cycles/hash 31.71 nanos/hash
Small key speed test - 28-byte keys - 71.14 cycles/hash 31.36 nanos/hash
Small key speed test - 32-byte keys - 72.71 cycles/hash 32.05 nanos/hash
Small key speed test - 36-byte keys - 71.20 cycles/hash 31.39 nanos/hash
Small key speed test - 40-byte keys - 71.94 cycles/hash 31.71 nanos/hash
Small key speed test - 48-byte keys - 100.11 cycles/hash 44.13 nanos/hash
Small key speed test - 56-byte keys - 93.32 cycles/hash 41.14 nanos/hash
Small key speed test - 64-byte keys - 99.21 cycles/hash 43.74 nanos/hash
-------------------------------------------------------------------------------
More information about the llvm-dev
mailing list