regressions/ck_ht: Previous commit was in fact shuffled insertion.

Add actual shuffled get.
ck_pring
Samy Al Bahra 13 years ago
parent efdae8f77b
commit 0b32fd064e

@ -312,6 +312,22 @@ main(int argc, char *argv[])
} }
printf(" Serial get: %" PRIu64 " ticks\n", a / (r * keys_length)); printf(" Serial get: %" PRIu64 " ticks\n", a / (r * keys_length));
a = 0;
for (j = 0; j < r; j++) {
keys_shuffle(keys_index);
s = rdtsc();
for (i = 0; i < keys_length; i++) {
if (table_get(keys[keys_index[i]]) == NULL) {
fprintf(stderr, "ERROR: Unexpected NULL value.\n");
exit(EXIT_FAILURE);
}
}
e = rdtsc();
a += e - s;
}
printf(" Random get: %" PRIu64 " ticks\n", a / (r * keys_length));
a = 0; a = 0;
for (j = 0; j < r; j++) { for (j = 0; j < r; j++) {
s = rdtsc(); s = rdtsc();

Loading…
Cancel
Save