Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Microsoft's experiment with STM ended up not going so well [1] [2]. Does anyone know how the PyPy implementation differs, and if it might overcome these problems? Is it just laying the groundwork for leveraging hardware transactional memory support, or is the thesis that this will eventually become usable directly?

[1]http://www.infoq.com/news/2010/05/STM-Dropped [2]http://www.bluebytesoftware.com/blog/2010/01/03/ABriefRetros...



This particular STM is promising because it is only about 5x slower than a well-optimized JIT, and yet it has no JIT yet. Once they do some low risk work it should be very close to vanilla pypi and faster than CPython. I'd love to be able to use the programming semantics you get as an app developer from an STM language.

The usual problem with STM is that generates many writes to memory. You ruin your cache locality and your program bottlenecks on the bus to RAM. Clojure solves this by using custom data structures that use "structural sharing". Pypy could solve this by using their JIT to elide writes.


To clarify, it's 1/5th the speed of normal PyPy without JIT per thread. Except it can now run on 8 cores, so it's slightly faster on an 8 core machine.

It's molasses compared to PyPy with JIT.


Oh dear, much slower than I thought. I misinterpreted that, thanks.


> Does anyone know how the PyPy implementation differs

It differs significantly in that the whole interpreter works under STM, it's not just an API.

> Is it just laying the groundwork for leveraging hardware transactional memory support, or is the thesis that this will eventually become usable directly?

It's a development project at this point (you can — and should — check the backlog on pypy's blog), but the goal is to have it usable directly and pave the groundwork for HTM/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: