mirror of
https://github.com/gperftools/gperftools
synced 2024-12-22 07:20:01 +00:00
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:
parent
b762b1a492
commit
a2550b6309
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user