in src/main/java/org/apache/datasketches/characterization/hash/HashBytesSpeedProfile.java [126:170]
void doTrial() {
final long seed = 0L;
final int bytesX = p.x;
final long startTrial_nS = System.nanoTime();
long myVin = vIn;
long start;
long stop;
long memHash = 0; //checksums
long otherHash = 0;
long fill_nS = 0;
long memHash_nS = 0;
long otherHash_nS = 0;
long sumInput = 0;
for (int i = 0; i < bytesX; i++) {
in[i] = (byte) myVin++;
}
start = System.nanoTime(); //Read
sumInput = readMem(wmem);
stop = System.nanoTime();
fill_nS = stop - start;
start = stop; //Memory hash
memHash = MurmurHash3v2.hash(wmem, 0, bytesX, seed, out)[0];
stop = System.nanoTime();
memHash_nS = stop - start;
start = stop; //other hash
otherHash = XxHash.hash(wmem, 0L, bytesX, seed);
stop = System.nanoTime();
otherHash_nS = stop - start;
p.sumTrials_nS += System.nanoTime() - startTrial_nS;
//Check that hashes are the same
// if (memHash != otherHash) {
// throw new IllegalStateException("Mem checksums do not match!");
// }
((Point)p).sumHash += otherHash + memHash + sumInput;
((Point)p).sumTrialsFill_nS += fill_nS;
((Point)p).sumTrialsMmmHash_nS += memHash_nS;
((Point)p).sumTrialsOtherHash_nS += otherHash_nS;
vIn = myVin;
}