On Tue, 21 Aug 2012 17:20:14 +0200
Andrea Griffini <agr...@tin.it> wrote:
> > My benchmark.py script calibrates automatically the number of loops to
> > take at least 100 ms, and then repeat the test during at least 1.0
> > second.
> >
> > Using time instead of a fixed number of loops is more reliable because
> > the test is less dependent on the system activity.
> 
> I've also been bitten in the past by something that is probably quite
> obvious but I didn't think to, that is dynamic cpu frequency. Many
> modern CPUs can dynamically change the frequency depending on the load
> and temperature and the switch can take more than one second.
> 
> When doing benchmarks now I've a small script (based on cpufreq-set)
> that just blocks all the cores into fast mode.

For the record, under Linux, the following command:

$ sudo cpufreq-set -rg performance

should do the trick.

Regards

Antoine.


-- 
Software development and contracting: http://pro.pitrou.net


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to