[Speed] Disable hash randomization to get reliable benchmarks

Armin Rigo arigo at tunes.org
Tue Apr 26 04:56:59 EDT 2016


Hi,

On 25 April 2016 at 08:25, Maciej Fijalkowski <fijall at gmail.com> wrote:
> The problem with disabled ASLR is that you change the measurment from
> a statistical distribution, to one draw from a statistical
> distribution repeatedly. There is no going around doing multiple runs
> and doing an average on that.

You should mention that it is usually enough to do the following:
instead of running once with PYTHONHASHSEED=0, run five or ten times
with PYTHONHASHSEED in range(5 or 10).  In this way, you get all
benefits: not-too-long benchmarking, no randomness, but still some
statistically relevant sampling.


A bientôt,

Armin.


More information about the Speed mailing list