[Thread-SIG] Re: [Python-Dev] baby steps for free-threading

Christopher Petrilli petrilli@amber.org
Wed, 19 Apr 2000 11:09:04 -0400


Salz, Rich [SalzR@CertCo.com] wrote:
> >This definitely slows Python down. If an object is known to be visible to
> >only one thread, then you can avoid the atomic inc/dec. But that leads to
> >madness :-)
> 
> I would much rather see the language extended to indicate that a particular
> variable is "shared" across free-threaded interpreters. The hit of taking
> a mutex on every incref/decref is way bad.

I wonder if the energy is better spent in a truly highly-optimized
implementation on the major platforms rather than trying to
conditional this.  This may mean writing x86 assembler, and a few
others, but then again, once written, it shouldn't need much
modification.  I wonder if the conditional mutexing might be slower
because of the check and lack of focus on bringing the core
implementation up to speed.

Chris

-- 
| Christopher Petrilli
| petrilli@amber.org