turn bench_fastpath_throughput into actual throughput benchmark

Previously we bumped size by 16 between iterations, but for many size
classess that gave is subsequent iteration into same size
class. Multiplying by prime number randomizes sizes more so speeds up
this benchmark on at least modern x86.
This commit is contained in:
Aliaksey Kandratsenka 2017-02-26 23:46:18 -08:00
parent b762b1a492
commit a2550b6309
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ static void bench_fastpath_throughput(long iterations,
free(p);
// this makes next iteration use different free list. So
// subsequent iterations may actually overlap in time.
sz = (sz & 511) + 16;
sz = ((sz * 8191) & 511) + 16;
}
}