Author dmalcolm
Recipients Arach, Arfrever, Huzaifa.Sidhpurwala, Jim.Jewett, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, eric.snow, fx5, georg.brandl, grahamd, gregory.p.smith, gvanrossum, gz, haypo, jcea, lemburg, loewis, mark.dickinson, merwok, neologix, pitrou, skorgu, skrah, terry.reedy, tim.peters, v+python, zbysz
Date 2012-02-01.03:29:14
SpamBayes Score 3.11356e-12
Marked as misclassified No
Message-id <1328066913.2893.18.camel@surprise>
In-reply-to <1327973656.07.0.527772935894.issue13703@psf.upfronthosting.co.za>
Content
On Tue, 2012-01-31 at 01:34 +0000, Dave Malcolm wrote:
> Dave Malcolm <dmalcolm@redhat.com> added the comment:
> 
> Am attaching a backport of optin-hash-randomization-for-3.1-dmalcolm-2012-01-30-002.patch to 2.6
> 
> Randomization covers the str, unicode and buffer types; equality of hashes is preserved for these types.

I tried benchmarking the 2.6 version of the patch.

I reran "perf.py" 16 times, setting PYTHONHASHRANDOMIZATION=1, and
--inherit_env=PYTHONHASHRANDOMIZATION so that the patched python uses
the randomization, using a different hash for each run.

Some tests are slightly faster with the patch on some runs; some are
slightly slower, and it appears to vary from run to run.  However, the
amount involved is a few percent.  [compare e.g. with msg151078]

Here's the command I used.
(for i in $(seq 16) ; do echo RUN $i ; (PYTHONHASHRANDOMIZATION=1
python ./perf.py
--inherit_env=PYTHONHASHRANDOMIZATION ../cpython-2.6-clean/python ../cpython-2.6-hash-randomization/python) ; done) | tee results-16.txt

Am attaching the results.
Files
File name Uploaded
results-16.txt dmalcolm, 2012-02-01.03:29:11
History
Date User Action Args
2012-02-01 03:29:16dmalcolmsetrecipients: + dmalcolm, lemburg, gvanrossum, tim.peters, loewis, barry, georg.brandl, terry.reedy, gregory.p.smith, jcea, mark.dickinson, pitrou, haypo, christian.heimes, benjamin.peterson, merwok, grahamd, Arfrever, v+python, alex, zbysz, skrah, gz, neologix, Arach, Mark.Shannon, eric.snow, Zhiping.Deng, Huzaifa.Sidhpurwala, Jim.Jewett, PaulMcMillan, fx5, skorgu
2012-02-01 03:29:15dmalcolmlinkissue13703 messages
2012-02-01 03:29:14dmalcolmcreate