4 ms·
> Software Transactional Memory Would pypy be able to take advantage of Haswell's hardware transactional memory?
by continuations 14y ago
> Software Transactional Memory
Would pypy be able to take advantage of Haswell's hardware transactional memory?
- fijal 14y agoNot in the current incarnation, the HTM buffer is too small.
- continuations 14y agoIs this specific to pypy or is the HTM buffer too small for most languages? Are there any languages that will be able to use Haswell's HTM?
- arigo 14y agoThe HTM buffer is too small for any language for doing what I'm talking about, which is long transactions. Haswell uses its L1 Data cache as buffer --- which means at most 32KB or 64KB, and only if you're on a lucky day. (Actually it depends on cache collision and alignment issues: it can in theory overflow with only 9 memory accesses, but I'd expect the numbers to be generally more than half the full cache size.) The HTM buffer is big enough if the goal is "only" to remove the GIL. It's going to be a 10-lines patch to CPython or PyPy (yes, really!). The GIL is often made into a big issue, but in my opinion removing it isn't the final solution to all multicore troubles in Python: that's just the first step.
- lmm 14y agoThe options were covered in-depth on http://morepypy.blogspot.co.uk/2012/08/multicore-programming-in-pypy-and.html http://morepypy.blogspot.co.uk/2012/08/multicore-programming... , posted here a few months ago