"Stephen J. Turnbull" <stephen at xemacs.org> writes: > >>>>> "Raymond" == Raymond Hettinger <python at rcn.com> writes: > Raymond> Also, multiple processors cannot boost performance > Raymond> because Python's Global Interpreter Lock (GIL) precludes > Raymond> more than one thread from running in the interpreter at > Raymond> the same time (this was done to simplify re-entrancy > Raymond> issues). > > This confused me because "running" is ambiguous. How about something > like: > > The Python interpreter itself is not fully reentrant, so threading > is accomplished by interleaving the execution of Python code from > different threads. Thus, use of multiple processors cannot boost > performance of threaded Python code, because a single instance of > the interpreter can only execute code on one processor at a time. > > (Season to taste, fix technical inaccuracies.) I see no reason to > mention the GIL, an implementation detail, at all. I somewhat prefer Raymond's version, myself. As soon as I read "execute code on one processor at a time", I immediately want to ask "Why?". The mention of the GIL more or less answers this, depending on how much you know about interpreters. Mike
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