Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Stefan Behnel
Armin Rigo, 11.04.2012 13:47: This is an update on the (so far PyPy-only) project of adding Automatic Mutual Exclusion to Python, via STM (Software Transactional Memory). [...] Moreover the performance hit is well below 2x, more like 20%. Hmm, those 20% refer to STM, right? Without hardware

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Armin Rigo
Hi Stefan, On Wed, Apr 11, 2012 at 14:29, Stefan Behnel stefan...@behnel.de wrote: Moreover the performance hit is well below 2x, more like 20%. Hmm, those 20% refer to STM, right? Without hardware support? Then hardware support could be expected to drop that even further? Yes, that's using

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Stefan Behnel
Armin Rigo, 11.04.2012 14:51: On Wed, Apr 11, 2012 at 14:29, Stefan Behnel wrote: Moreover the performance hit is well below 2x, more like 20%. Hmm, those 20% refer to STM, right? Without hardware support? Then hardware support could be expected to drop that even further? Yes, that's using

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Stefan Behnel
Stefan Behnel, 11.04.2012 15:31: Armin Rigo, 11.04.2012 14:51: On Wed, Apr 11, 2012 at 14:29, Stefan Behnel wrote: Did you do any experiments with running parallel code so far, to see if that scales as expected? Yes, it scales very nicely on small non-conflicting examples. I believe that

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Charles-François Natali
Yes, that's using STM on my regular laptop.  How HTM would help remains unclear at this point, because in this approach transactions are typically rather large --- likely much larger than what the first-generation HTM-capable processors will support next year. Ok. I guess once the code is

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Antoine Pitrou
On Wed, 11 Apr 2012 15:31:09 +0200 Stefan Behnel stefan...@behnel.de wrote: Ok. I guess once the code is there, the hardware will eventually catch up. However, I'm not sure what you consider large. A lot of manipulation operations for the builtin types are not all that involved, at least in

Re: [Python-Dev] Experimenting with STM on CPython

2012-04-11 Thread Armin Rigo
Hi Antoine, hi Stefan, On Wed, Apr 11, 2012 at 16:33, Antoine Pitrou solip...@pitrou.net wrote: I think Armin's plan is not to work at the bytecode level, but make transactions explicit (at least in framework code - e.g. Twisted or Stackless -, perhaps not in user code). Perhaps he can