8 thoughts on “(Italiano) Stackless Python vs. Go”

  1. Tasklets and Goroutines are both green treads (e.g. are lightweight ans scale well compared to OS-level threads) , so there shouldn’t be much difference there.

    One thing I suspect might be different is that goroutines are supposted to be distributed over a set of threads, where as tasklets only run in one thread (and also only on one core due to the GIL in Python, which means Stackless wouldn’t scale on a multi core system at all).

    Goland manages goroutines and can reallocate goroutines to a different os-thread if one goroutine block (on IO for instance).
    This adds could add some overhead.
    For what I know Golang doesn’t use this feature yet, since it’s not stable yet. So I’m not sure if it has anything to do with the difference in speed.

    Your test with an added load is interesting, because the original test results in just a number of function calls, for which Python could do very well. The biggest difference between Golang and Python is in the typesystem, the intepreter is pretty much the least slow thing for that kind of test.

  2. Sorry, but Tasklets and Goroutines are both coroutines, not Green Threads (e.g. a Thread containing only one routine is a coroutine as well).

    Tasklets are implemented as Green Threads (they are entirely managed by the Python VM), while Goroutines, as of now, are P-Threads.

    I guess the idea for the future is, as you said, to have only a few OS threads and multiplex the Goroutines upon them, but that would require features that are not present in the runtime right now.

  3. Molto interessante! Certo che è raro trovare un linguaggio più lento di python! 🙂
    Possibile che vogliano sacrificare così tanto in cambio di una compilazione veloce? A quel punto, perché non usare un interprete e un lint? 😀

    (tra l’altro non avevo ancora sentito parlare di stackless python, direi che ha delle caratteristiche decisamente interessanti, da approfondire)

  4. Cominciano ad essere riconosciuti i tuoi meriti:

    Google, nel 2010
    arriva lo smarthphone
    Sarà venduto online
    e senza intermediari
    Si chiamerà Nexus One. I servizi di telefonia mobile verranno acquistati separatamente

  5. Yes it has green threads (stackless) that allow quickly create many lightweight threads as long as no operations are blocking (something like Ruby’s threads?). What is this great for? What other features it has I want to use over CPython?

Leave a Reply

Your email address will not be published. Required fields are marked *