Project

General

Profile

News

SipHash 0.3.1 is out!

Added by Sylvain Laperche about 3 years ago

Hi,

SipHash 0.3.1 is out!

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:
  1. hash the whole data in one pass (Block mode).
  2. hash the data incrementally (Streaming mode), one byte at time.
  3. hash the data incrementally (Streaming mode), by chunk (of 4096 bytes for example).The chunks' sizes can be variable.
I did the following benchmark:
  • 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        |

SipHash 0.3.0 released

Added by Sylvain Laperche about 3 years ago

Hi,

My implementation in Ada of the SipHash PRFs is released.
The version 0.3.0 is based on a generic package that allow you to use any PRF (pseudo-random function) of the SipHash family.

Two interfaces are provided:
- a block interface (to hash a buffer)
- a streaming interface (for an incremental hashing)

The implementation is successfully tested against the reference values provided in the original research paper and in the reference C implementation.

    (1-2/2)

    Also available in: Atom