SipHash 0.3.1 is out!
Hi,
No new features for this release, but a non-negligible improvement of the execution speed for two of the three use cases :-)
The three use cases are:- hash the whole data in one pass (Block mode).
- hash the data incrementally (Streaming mode), one byte at time.
- hash the data incrementally (Streaming mode), by chunk (of 4096 bytes for example).The chunks' sizes can be variable.
- Input size: ~440 MiB (461 073 466 octets)
- Compiler options: -O3 -fomit-frame-pointer -funroll-loops
- CPU: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (frequency scaling disabled)
- Timing done with clock_gettime (CLOCK_MONOTONIC) for C and Ada.Calendar.Clock for Ada
- Sample size: 100 replications
Version 0.3.0 (the previous version)¶
SipHash-2-4¶
| Interfaces | Minimum (s) | Maximum (s) | Mean (s) | Standard deviation | |-------------------------------------|-------------|-------------|----------|--------------------| | Block | 1.168 | 1.254 | 1.191 | 0.017 | | Streaming (one octet at time) | 1.277 | 1.348 | 1.303 | 0.016 | | Streaming (by block of 4096 octets) | 1.176 | 1.249 | 1.200 | 0.016 |
SipHash-4-8¶
| Interfaces | Minimum (s) | Maximum (s) | Mean (s) | Standard deviation | |-------------------------------------|-------------|-------------|----------|--------------------| | Block | 1.953 | 2.100 | 2.000 | 0.034 | | Streaming (one octet at time) | 1.808 | 1.925 | 1.841 | 0.022 | | Streaming (by block of 4096 octets) | 1.803 | 1.896 | 1.831 | 0.023 |
Version 0.3.1 (this version)¶
SipHash-2-4¶
| Interfaces | Minimum (s) | Maximum (s) | Mean (s) | Standard deviation | |-------------------------------------|-------------|-------------|----------|--------------------| | Block | 0.431 | 0.458 | 0.437 | 0.005 | | Streaming (one octet at time) | 1.112 | 1.168 | 1.127 | 0.010 | | Streaming (by block of 4096 octets) | 0.458 | 0.493 | 0.466 | 0.007 |
SipHash-4-8¶
| Interfaces | Minimum (s) | Maximum (s) | Mean (s) | Standard deviation | |-------------------------------------|-------------|-------------|----------|--------------------| | Block | 0.781 | 0.811 | 0.793 | 0.007 | | Streaming (one octet at time) | 1.432 | 1.571 | 1.469 | 0.033 | | Streaming (by block of 4096 octets) | 0.810 | 0.898 | 0.832 | 0.017 |
Reference C implementation¶
For comparison, here are the results of the reference C implementation (only SipHash-2-4 is implemented):
| Interfaces | Minimum (s) | Maximum (s) | Mean (s) | Standard deviation | |-------------------------------------|-------------|-------------|----------|--------------------| | Block | 0.484 | 0.503 | 0.489 | 0.004 | | Streaming (one octet at time) | N/A | N/A | N/A | N/A | | Streaming (by block of 4096 octets) | N/A | N/A | N/A | N/A |