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-May/119435.html below:

[Python-Dev] Point of building without threads?

[Python-Dev] Point of building without threads? [Python-Dev] Point of building without threads?Antoine Pitrou solipsis at pitrou.net
Thu May 10 20:41:53 CEST 2012
On Thu, 10 May 2012 20:23:08 +0200
Stefan Krah <stefan at bytereef.org> wrote:
> Antoine Pitrou <solipsis at pitrou.net> wrote:
> > On Wed, 9 May 2012 11:26:29 +0200
> > Stefan Krah <stefan at bytereef.org> wrote:
> > > Antoine Pitrou <solipsis at pitrou.net> wrote:
> > > > > _decimal is about 12% faster without threads, because the expensive
> > > > > thread local context can be disabled.
> > > > 
> > > > If you cached the last thread id along with the corresponding context,
> > > > perhaps it could speed things up in most scenarios?
> > > 
> > > Nice. This reduces the speed difference to about 4%!
> > 
> > Note that you don't need the actual thread id, the Python thread state
> > is sufficient: PyThreadState_GET should be a simply variable lookup in
> > release builds.
> 
> I've tried both ways now and the speed gain is roughly the same.
> 
> Perhaps the interpreter as a whole is slightly faster --without-threads?
> That would explain the remaining speed difference of 4%.

It may be. Can you try other benchmarks?

Regards

Antoine.


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