3 ms·
Won't the GIL really limit the performance of this?
by magnusmorton 14y ago
Won't the GIL really limit the performance of this?
- tbatterii 14y agosweet, I was wondering when someone was going to mention the GIL, now the fun can start. http://dabeaz.blogspot.com/2012/03/pycon-2012-followup.html http://dabeaz.blogspot.com/2012/03/pycon-2012-followup.html "In any case, the performance of threads is highly specific to the application at hand. You can't just take some benchmark from one of my GIL talks and extrapolate that out to a general statement about all Python thread programming. Personally, I find that Python threads have worked pretty well for most of the problems where I've used them. Of course your mileage might vary." So.... maybe, it depends on what you are doing. Personally I would have been happy to see ProcessingActor in pykka, maybe with 0mq for the ipc. That would be cool, but this looks useful nonetheless.
- apgwoz 14y agothe multiprocessing module has "Managers" which can be used for IPC. I'm guessing that you could just communicate with those via Unix sockets, or TCP sockets on 127.0.0.1 and get pretty comparable results with 0mq, no? I've been using managers over TCP for use as an image cache (the program is essentially an image resizing proxy), and in my limited benchmarks, it's fast enough. Now, this isn't some real-time trading application, so maybe 0mq would squeeze something, but TCP/Unix sockets is probably fast enough for most purposes here.
- tbatterii 14y agowell for me , 0mq makes ipc easy, I'm not too concerned about performance myself. though I do enjoy it. :)
- bascule 14y agoNot on Jython, which has no GIL by virtue of the JVM. Work on Jython has recently resumed and the new work is focusing on adding InvokeDynamic support, which I think is really exciting. (I say this all as a Rubyist who as seen these same problems on the Ruby side)
- sciurus 14y agoIt's great to see that Jython development has picked up! For the interested, details are at http://sourceforge.net/mailarchive/forum.php?thread_name=jjarhr%245e0%241%40dough.gmane.org&forum_name=jython-dev http://sourceforge.net/mailarchive/forum.php?thread_name=jja...