<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi Armin:</span></div><div><br></div> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Armin Rigo <arigo@tunes.org><br> <b><span style="font-weight: bold;">To:</span></b> PyPy Developer Mailing List <pypy-dev@python.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, February 16, 2012 3:58 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> [pypy-dev] STM status<br> </font> </div> <br>>An update for STM: today I managed to build a pypy using the new "stm<br>>gc". It runs <a target="_blank"
href="http://richards.py">richards.py</a> on tannit:<br><br>>in 1 thread: 2320 ms per iteration<br>>in 2 threads: 1410 ms per iteration<br>>in 4 threads: 785 ms per iteration<br>>in 8 threads: 685 ms per iteration<br><br>>The small gap between 4 and 8 threads is due to tannit having only 4<br>>"real" cpus, each one hyperthreaded. The additional gain is thus<br>>smaller than expected.<br><br> </div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">This is really exciting stuff. As always I have a few questions.</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">1) I have been looking at the transaction module and its dependent modules.</div><div
style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">In rstm.perform_transaction, I see a comment to a "custom GIL." So the GIL is still there? Or will it be eventually removed?</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">2) I have glanced over the transaction and rstm module (it would help if I understood PyPy's architecture better but I am working on that). I figured it would be best to focus on translator.transform.py and translator.llstminterp.py first to understand what is happening at a high level. </div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new
roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">I admit I am not comfortable with reading the code. However I see places where the code distinguishes between mutable and immutable, local and non local variables. I will assume mutable and non-local variables will be the subject of transactional memory. </div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"> <br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">Although the STM implementation will be transparent to the programmer (there is only transaction.run() and transaction.add() available to the programmer), can I assume that one can "help" the STM if a) somehow more variables can be marked as immutable? 2)"Threads of execution" do not share state. Essentially a more functional programming
approach.</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">Or am I reading too much into this?</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">3) Could the stackless module work with STM?</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962"><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;" class="yui_3_2_0_15_132950332107962">Cheers,</div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"
class="yui_3_2_0_15_132950332107962">Andrew</div> </div> </div></body></html>