A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-August/121417.html below:

[Python-Dev] 3.3 str timings

[Python-Dev] 3.3 str timings [Python-Dev] 3.3 str timingsAntoine Pitrou solipsis at pitrou.net
Tue Aug 21 17:53:15 CEST 2012
On Tue, 21 Aug 2012 17:20:14 +0200
Andrea Griffini <agriff at 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


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4