Hash 64 bytes
hash · compared across machine types · 24 Series on 8 machine types · AWS us-east-2
CPU
Algorithm
Order
| Compare | Machine | Variant | P50 | P99 | Rate | Unit cost | Runs |
|---|---|---|---|---|---|---|---|
| c8a.2xlarge | 58.80 ns | — | 1.089 GB/s | $0.00000703 /1M ops | 89 | ||
| c8i.2xlarge | 76.69 ns | — | 834.5 MB/s | $0.00000798 /1M ops | 89 | ||
| c8g.2xlarge | 88.00 ns | — | 727.3 MB/s | $0.00000774 /1M ops | 4 | ||
| c6i.8xlarge | 101.1 ns | — | 632.7 MB/s | $0.0000382 /1M ops | 89 | ||
| i4i.2xlarge | 101.2 ns | — | 632.6 MB/s | $0.0000193 /1M ops | 89 | ||
| m6id.2xlarge | 101.2 ns | — | 632.5 MB/s | $0.0000133 /1M ops | 1 | ||
| i4g.2xlarge | 112.2 ns | — | 570.3 MB/s | $0.0000193 /1M ops | 4 | ||
| m5.large | 571.4 ns | — | 112.0 MB/s | $0.0000152 /1M ops | 91 |
Compared:m5.largec8g.2xlargec8i.2xlarge
Run-to-run spread
time per hash across counted RunsOver time
newest counted Runs, time per hash(one request each to the data API)
What this measures
How long one thread takes to hash an input of a given size, from 64 bytes to 100 MiB, with CRC32C, with SipHash-1-3 under a fixed key (the variant Rust's DefaultHasher uses), or with SHA-256, using the processor's CRC and SHA instructions when it has them.
What it does not measure
- Every repetition hashes the same input, which the program fills in before measuring (byte i holds i mod 256).
- For 64 bytes no repetition uses the result of the one before: the figure is the time per hash of hashes computed back to back, which the processor may overlap, not a measurement of one hash on its own.
crc32is one dependent chain ofcrc32instructions, not the interleaved or carry-less-multiply forms that libraries such as zlib-ng, ISA-L or the Linux kernel use on long inputs, which run several times faster on the same processor.
Code & config
Benchmark docsSeries JSONc8i.2xlarge · sha256
404static void sha256_finish_64(void (*compress)(uint32_t state[8], const uint8_t block[64]),405 const uint8_t *data, uint8_t digest[32]) {406 uint32_t state[8];407 memcpy(state, sha256_initial, sizeof(state));408 compress(state, data);// …414 compress(state, pad);// …531static void sha256_ni_digest_64(const uint8_t *data, uint8_t digest[32]) {532 sha256_finish_64(sha256_compress_ni, data, digest);533}// …583static uint64_t sha256_ni_64_run(void *arg) {584 hash_ctx_t *ctx = (hash_ctx_t *)arg;585 return sha256_ni_64(ctx->input);586}// …797 if (__builtin_cpu_supports("sha")) {798 p = (hash_path_t){ "sha-ni", sha256_ni_low64, sha256_ni_run, sha256_ni_64, sha256_ni_64_run };// …853 /* 64 bytes: the July 2026 function, whose Series go back to it. */854 bool fixed = size_bytes == HASH64_BYTES;855 lm_fn run = fixed ? p.run64 : p.run;// …863 lm_measure(run, &ctx);
Configuration
- benchmarkhash
- buildstatic
- instancec8i.2xlarge
- regionus-east-2
- azuse2-az3
- params.algorithmsha256
- params.size_bytes64