A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-August/028473.html below:

[Python-Dev] tiny optimization in ceval mainloop

[Python-Dev] tiny optimization in ceval mainloop [Python-Dev] tiny optimization in ceval mainloopGuido van Rossum guido@python.org
Fri, 30 Aug 2002 11:22:01 -0400
> So long as the ticker is declared volatile, the odds of setting ticker to 0
> in Py_AddPendingCall during a "bad time" for --ticker are small, a window of
> a couple machine instructions.  Ticker will eventually go to 0 regardless.
> It's not like things_to_do isn't ignored for "long" stretches of time now
> either:  Py_MakePendingCalls returns immediately unless the thread with the
> GIL just happens to be the main thread.  Even if it is the main thread,
> there's another race there with some non-main thread happening to call
> Py_AddPendingCall at the same time.

Good point.  (Though some apps set the check interval to 1000; well,
that would still be fast enough.)

> Opening another hole of a couple machine instructions shouldn't make much
> difference, although Py_MakePendingCalls should also be changed then to
> reset ticker to 0 in its "early exit because the coincidences I'm relying on
> haven't happened yet" cases.

OK, let's try it then.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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