Skip to content
Projekte

Über uns

A SIMD-accelerated implementation of the BLAKE3 cryptographic hash function

Sicherheit und Datenschutz

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
0
in 15 days
+2
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

blake3

GoDoc Go Report Card

go get lukechampine.com/blake3

blake3 implements the BLAKE3 cryptographic hash function. This implementation aims to be performant without sacrificing (too much) readability, in the hopes of eventually landing in x/crypto.

In addition to the pure-Go implementation, this package also contains AVX-512, AVX2, and NEON routines (generated by avo) that greatly increase performance for large inputs and outputs.

Benchmarks

NEON (Apple M5)

BenchmarkSum256/64            55.0 ns/op     1164.74 MB/s
BenchmarkSum256/1024           763 ns/op     1341.93 MB/s
BenchmarkSum256/65536        17386 ns/op     3769.38 MB/s
BenchmarkSum256/1048576     102739 ns/op    10206.22 MB/s
BenchmarkWrite                 271 ns/op     3775.00 MB/s
BenchmarkXOF/64                276 ns/op      231.85 MB/s
BenchmarkXOF/1024              275 ns/op     3724.86 MB/s
BenchmarkXOF/65536           15197 ns/op     4312.48 MB/s
BenchmarkXOF/1048576         92855 ns/op    11292.58 MB/s

AVX-512 (Sapphire Rapids)

BenchmarkSum256/64            57.9 ns/op     1104.72 MB/s
BenchmarkSum256/1024          1001 ns/op     1023.17 MB/s
BenchmarkSum256/65536        11845 ns/op     5532.66 MB/s
BenchmarkSum256/1048576     112963 ns/op     9282.48 MB/s
BenchmarkWrite                 186 ns/op     5493.45 MB/s
BenchmarkXOF/64                203 ns/op      314.86 MB/s
BenchmarkXOF/1024              197 ns/op     5197.80 MB/s
BenchmarkXOF/65536           14024 ns/op     4673.17 MB/s
BenchmarkXOF/1048576        103942 ns/op    10088.07 MB/s

AVX-512 (Zen 4)

BenchmarkSum256/64            78.4 ns/op      816.27 MB/s
BenchmarkSum256/1024          1130 ns/op      906.53 MB/s
BenchmarkSum256/65536        11704 ns/op     5599.62 MB/s
BenchmarkSum256/1048576     114372 ns/op     9168.11 MB/s
BenchmarkWrite                 184 ns/op     5566.29 MB/s
BenchmarkXOF/64                187 ns/op      341.59 MB/s
BenchmarkXOF/1024              186 ns/op     5500.88 MB/s
BenchmarkXOF/65536           13076 ns/op     5011.96 MB/s
BenchmarkXOF/1048576         91890 ns/op    11411.27 MB/s

AVX2 (Haswell)

BenchmarkSum256/64             127 ns/op      504.77 MB/s
BenchmarkSum256/1024          1648 ns/op      621.25 MB/s
BenchmarkSum256/65536        30216 ns/op     2168.96 MB/s
BenchmarkSum256/1048576     209064 ns/op     5016.46 MB/s
BenchmarkWrite                 490 ns/op     2091.03 MB/s
BenchmarkXOF/64                481 ns/op      133.05 MB/s
BenchmarkXOF/1024              485 ns/op     2111.72 MB/s
BenchmarkXOF/65536           31513 ns/op     2079.63 MB/s
BenchmarkXOF/1048576        182135 ns/op     5757.12 MB/s

Pure Go (Apple M5)

BenchmarkSum256/64            56.0 ns/op     1143.52 MB/s
BenchmarkSum256/1024           854 ns/op     1199.34 MB/s
BenchmarkSum256/65536        58097 ns/op     1128.11 MB/s
BenchmarkSum256/1048576     254635 ns/op     4120.89 MB/s
BenchmarkWrite                 900 ns/op     1137.81 MB/s
BenchmarkXOF/64                795 ns/op       80.53 MB/s
BenchmarkXOF/1024              793 ns/op     1290.70 MB/s
BenchmarkXOF/65536           27270 ns/op     2403.23 MB/s
BenchmarkXOF/1048576        245244 ns/op     4276.66 MB/s

Pure Go (Haswell)

BenchmarkSum256/64             193 ns/op      331.69 MB/s
BenchmarkSum256/1024          2952 ns/op      346.87 MB/s
BenchmarkSum256/65536       194440 ns/op      337.36 MB/s
BenchmarkSum256/1048576    1104876 ns/op      949.06 MB/s
BenchmarkWrite                3132 ns/op      326.96 MB/s
BenchmarkXOF/64               2968 ns/op       21.57 MB/s
BenchmarkXOF/1024             3026 ns/op      338.39 MB/s
BenchmarkXOF/65536          108430 ns/op      605.14 MB/s
BenchmarkXOF/1048576       1252534 ns/op      837.71 MB/s

Ähnliche Projekte entdecken

Wird geladen…