Live data from Hacker News

PyPy-STM 2.5.1 released

morepypy.blogspot.com

1–10 of 13 posts

Re: PyPy-STM 2.5.1 released

#3
> It is a Python in which you can do minor tweaks to your existing, non-multithreaded programs and get them to use multiple cores. You identify medium- or large-sized, likely-independent parts of the code and to ask PyPy-STM to run these parts in parallel. An example would be every iteration of some outermost loop over all items of a dictionary.

This is very neat! Obviously it's not a magic drop-in, but still.

Relevant bit from the docs: http://pypy.readthedocs.org/en/latest/stm.html#transaction-t...

Re: PyPy-STM 2.5.1 released

#4

> It is a Python in which you can do minor tweaks to your existing, non-multithreaded programs and get them to use multiple cores. You identify medium- or large-sized, likely-independent parts of the code and to ask PyPy-STM to run these parts in parallel. An example would be every iteration of some outermost loop over all items of a dictionary. This is very neat! Obviously it's not a magic drop-in, but still. Releva…

The main point is that at first, your code will be slow (as in bound to a single core) and then you can optimize it to provide better performance. This is as opposed to threads, where your code will be immediately fast, but buggy. The difference comes from the fact that 90% correct is still buggy, but 90% paralellizable is kinda good.

Re: PyPy-STM 2.5.1 released

#5
Amazing! I'd really want to try this out in production if you guys can bump python3 support to 3.3 and have a 3.3+STM version. So looking forward to that!

Re: PyPy-STM 2.5.1 released

#6
post #5

Amazing! I'd really want to try this out in production if you guys can bump python3 support to 3.3 and have a 3.3+STM version. So looking forward to that!

that should be very easy, since STM is mostly a project that is independent of the interpreter (e.g. you can use it in hippyvm or pyrolog). Good project as a start of contribution ;-)

Re: PyPy-STM 2.5.1 released

#7
I might be way off here, but does PyPy-STM works at all with the new stdlib asyncio?

I mean, the whole purpose of asyncio is running non-blocking I/O in a single thread and delegate blocking CPU-bound executions to other threads (with the run_in_executor method), but it would be awesome to share the asyncio loop event between multiple threads. I don't know if this is possible though.

Re: PyPy-STM 2.5.1 released

#9
post #4

> It is a Python in which you can do minor tweaks to your existing, non-multithreaded programs and get them to use multiple cores. You identify medium- or large-sized, likely-independent parts of the code and to ask PyPy-STM to run these parts in parallel. An example would be every iteration of some outermost loop over all items of a dictionary. This is very neat! Obviously it's not a magic drop-in, but still. Releva…

The main point is that at first, your code will be slow (as in bound to a single core) and then you can optimize it to provide better performance. This is as opposed to threads, where your code will be immediately fast, but buggy. The difference comes from the fact that 90% correct is still buggy, but 90% paralellizable is kinda good.

Is there a transaction module that provides a null/no-op implementation for compatibility with CPython?

Re: PyPy-STM 2.5.1 released

#10
post #9
post #4

Earlier quoted context omitted.

The main point is that at first, your code will be slow (as in bound to a single core) and then you can optimize it to provide better performance. This is as opposed to threads, where your code will be immediately fast, but buggy. The difference comes from the fact that 90% correct is still buggy, but 90% paralellizable is kinda good.

Is there a transaction module that provides a null/no-op implementation for compatibility with CPython?

yes, normal transaction.py should just work :-)
Post reply on HN