5 ms·
Right, so that is a latency test because each result feeds back into the next call (through seed). A typical throughput test would be like: total = 0; for
by BeeOnRope 8y ago
Right, so that is a latency test because each result feeds back into the next call (through seed). A typical throughput test would be like:
total = 0;
for (;;) {
total += hash( val, seed );
}
Note that the hash value is consumed, but doesn't feed into the next result so multiple hashes can run in parallel. If that wasn't the case, it is lucky the loop wasn't compiled away entirely (probably because the hash functions and the test loop are in different compilation units and LTO is not turned on).
- injinj 8y agoI just re-ran this with a total += hash(). It adds about 2 - 4 cycles to the throughput test (the non-latency graph).