Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Is having a GIL good or bad? (and why).</p> </blockquote> <p>Neither -- or both. It's necessary for thread synchronization. </p> <blockquote> <p>Is the new GIL better? If so, how?</p> </blockquote> <p>Have you run any benchmarks? If not, then perhaps you should (1) run a benchmark, (2) post the benchmark in the question and (3) ask <strong>specific</strong> questions about the benchmark results.</p> <p>Discussing the GIL in vague, handwaving ways is largely a waste of time.</p> <p>Discussing the GIL in the specific context of your benchmark, however, can lead to a solution to your performance problem.</p> <blockquote> <p>Question though, why does CPython not just clone the interpreter like Perl does in an attempt to remove the need for the GIL?</p> </blockquote> <p>Read this: <a href="http://perldoc.perl.org/perlthrtut.html" rel="nofollow noreferrer">http://perldoc.perl.org/perlthrtut.html</a></p> <p>First, Perl didn't support threads at all. Older Perl interpreters had a buggy module that didn't work correctly.</p> <p>Second, the newer Perl interpreter has this feature.</p> <blockquote> <p>The biggest difference between Perl ithreads and the old 5.005 style threading, or for that matter, to most other threading systems out there, is that by default, no data is shared. When a new Perl thread is created, all the data associated with the current thread is copied to the new thread, and is subsequently private to that new thread! </p> </blockquote> <p>Since the Perl (only specific data is shared) model is different from Python's (all data is shared) model, copying the Perl interpreter would fundamentally break Python's threads. The Perl thread model is fundamentally different.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload