Using python as primary language
Rhamphoryncus
rhamph at gmail.com
Fri Nov 9 12:52:34 EST 2007
On Nov 9, 9:14 am, "Chris Mellon" <arka... at gmail.com> wrote:
> The heavy use of dicts is one of the problems - they're all over the
> place and even if you removed the GIL, a "global dict lock" would give
> essentially the same effect. And a per-dict lock means that there will
> be a *lot* more locking and unlocking, which means a slower
> interpreter.
It's worse than that. Not only are they slower for a single thread,
but when using multiple threads the cores will contend over the cache
lines containing the locks, leaving you yet slower still!
I've starting putting together a site explaining my approach to
solving these problems:
http://code.google.com/p/python-safethread/
--
Adam Olsen, aka Rhamphoryncus
More information about the Python-list
mailing list