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/2002-August/028462.html below:

[Python-Dev] tiny optimization in ceval mainloop

[Python-Dev] tiny optimization in ceval mainloopJack Jansen Jack.Jansen@cwi.nl
Fri, 30 Aug 2002 10:18:26 +0200
On Friday, August 30, 2002, at 03:37 , Skip Montanaro wrote:

>
>     Greg> Could you have just one ticker, instead of one per thread?
>
> That would make ticker really count down checkinterval ticks.  Also, of
> possible interest is this declaration and comment in longobject.c:
>
>     static int ticker;  /* XXX Could be shared with ceval? */
>
> Any time C code would want to read or update ticker, it would have the 
> GIL,
> right?

Not if the idea that lead to this thread (clearing ticker if something 
is put in things_to_do)
is implemented, because we may be in an interrupt routine at the time we 
fiddle things_to_do.

And I don't think we can be sure that even clearing is guaranteed to 
work (if another
thread is halfway a load-decrement-store sequence the clear could be 
lost).
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -




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