On 4 August 2014 09:38, Clément Bera <bera.clement@gmail.com> wrote:
2014-08-04 10:17 GMT+02:00 Yuriy Tymchuk <yuriy.tymchuk@me.com>:
Hi guys,
I have a script that runs very slow and does a lot of non dependent operation of a collection. I wander if I can speed it up by making it run in another process, because as far as I understand everything runs on a single thread, so I guess this wonât save me.
I don't think forking can speed up anything.
But that's only because we're single-threaded, hence single-cored. If we had a VM that handle multiple threads (like if we resuscitated Andreas' and Igor's Hydra work), then forking _would_ speed things up. But that would raise another huge issue, namely the shared state nature of the image. So perhaps forking _would_ help if your computations were big enough to justify the cost of spinning up a clone image, like David Lewis' recent work. frank
Usually the best solution is to profile your operation with the Profiler, then implement differently costly operations, either by removing object/block creations in smalltalk if this is possible, else by implementing costly operations in C and bind them like that: http://clementbera.wordpress.com/2013/06/19/optimizing-pharo-to-c-speed-with...
Uko