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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Using Go 1.17.7 (benchstat output), darwin_amd64, i7-1068N7 CPU
34
+
- Using Go 1.17.7, darwin_amd64, i7-1068N7 CPU
35
35
- Fastest XXH64 (written in Go+Assembly) doesn't support seed.
36
36
37
37
ℹ️ Non-cryptographic hashes should only be used in software designed to properly handle hash collisions. If you require a secure hash, please use a cryptographic hash (like the ones in SHA-3 standard).
@@ -56,23 +56,15 @@ CircleHash64 comes in two flavors:
56
56
57
57
- 🚀 **CircleHash64f** can be configured to produce same digests as Abseil LTS 20210324.2. By default, CircleHash64f uses two different 64-bit constants rather than using the same 64-bit constant twice at finalization. And unlike internal hashes, CircleHash64f offers backward compatibility (SemVer 2.0).
58
58
59
-
CircleHash64 uses CircleHash64f by default and supports 64-bit seeds.
59
+
CircleHash64 uses CircleHash64f by default and supports 64-bit seeds. It was created when I needed a very fast seeded hash for inputs mostly <= 128 bytes.
60
60
61
-
## CircleHash Speed in Go and C++
62
-
63
-
CircleHash64 is among the fastest hashes for short inputs. Unoptimized CircleHash64 in Go is faster than optimized XXH64 in Go+Assembly.
64
-
65
-
CircleHash64 is faster than executing this assignment just once in a Go program:
66
-
67
-
```Go
68
-
foo = uint64_a % uint64_b // slower than CircleHash64f and CircleHash64fx on Haswell Xeon
69
-
```
61
+
## Benchmarks
70
62
71
-
Speeds were compared using Go 1.16.8 on linux_amd64 (Haswell CPU) with unoptimized CircleHash64. On newer Intel CPUs the modulus can be slightly faster.
63
+
CircleHash64f is ideal for input sizes <= 512 bytes. Larger inputs can be hashed faster using other CircleHash designs (not yet published).
72
64
73
-
## Benchmarks
65
+
For best results, it's better to do your own benchmarks using your own hardware and your most common data sizes.
74
66
75
-
Coming soon... For best results, it's better to do your own benchmarks using your own hardware and your most common data sizes.
67
+
Coming soon...
76
68
77
69
## Status [DRAFT]
78
70
-[x] dependable release policy: all tests must pass and enforce Semantic Versioning 2.0
@@ -94,9 +86,11 @@ Coming soon... For best results, it's better to do your own benchmarks using you
94
86
-[ ] 32-bit archs
95
87
-[ ] long-running collision tests (need big server 256 GB RAM)
96
88
-[x] publish reference code for CircleHash64f in Go
89
+
-[x] publish compatibility test vectors for CircleHash64f (see *_test.go)
90
+
-[x] publish preliminary benchmarks comparisons for CircleHash64f reference implementation (Go without assembly language)
91
+
-[ ] publish detailed benchmarks that include all input sizes <= 128 bytes (or <= 256 bytes if time allows)
97
92
-[ ] publish reference code for CircleHash64fx in Go
98
-
-[ ] publish compatibility test vectors for CircleHash64f
99
-
-[ ] publish benchmarks for unoptimized CircleHash64 reference implementation (Go)
93
+
-[ ] publish reference code for CircleHash128
100
94
-[ ] provide implementations in other languages
101
95
-[ ] provide optional functions for creating high quality seeds
102
96
-[ ] provide optional functions for creating high quality constants (to override **π**)
0 commit comments