37
37
38
38
` Hasher.update ` is mutable when ` Hasher.done ` isn't.
39
39
40
- ` Hasher.update ` supports different input such as: byte array, part of byte array, single byte or string.
40
+ ` Hasher.update ` supports different input such as: byte array, part of byte array, single byte or string,
41
+ and many others like ` OutputStream ` or ` ByteBuffer ` .
41
42
42
43
` Hasher.done ` supports different output such as:
43
44
- ` done(out: Array[Byte]) ` to fill full provided array;
@@ -59,14 +60,13 @@ As baseline for benchmarks I've used original C version [c-0.3.7] via JNI interf
59
60
that was implemented as part of [ BLAKE3jni] .
60
61
61
62
All benchmarks was performed on two machines:
62
- - ` Zulu16+59 -CA (build 16-ea+24 )` at [ Intel® Core™ i7-8700B] with [ AVX2 assembly] optimization inside baseline,
63
- - ` Zulu16+65 -CA (build 16-ea+24 )` at [ Apple M1] without any assembly optimization inside baseline.
63
+ - ` Zulu11.56+19 -CA (build 11.0.15+10-LTS )` at [ Intel® Core™ i7-8700B] with [ AVX2 assembly] optimization inside baseline,
64
+ - ` Zulu11.56+19 -CA (build 11.0.15+10-LTS )` at [ Apple M1] without any assembly optimization inside baseline.
64
65
65
66
Short summary:
66
- - it is about 5 times slower than [ AVX2 assembly] version via JNI that is expected,
67
+ - it is about 4 times slower than [ AVX2 assembly] version via JNI that is expected,
67
68
- it is about 30% slower than original C version via JNI,
68
- - it has memory footprint near 20% of hashed data that is cleaned up by GC,
69
- - it has near to constant memory footprint that won't be cleaned up by GC,
69
+ - it has constant memory footprint (yeah, no GC on hashing!),
70
70
- increasing result hash size has the same impact such as hashing.
71
71
72
72
Full version of results are available as
0 commit comments