views:

342

answers:

1

stackless python didn't take a good usage of multi-core, so where is the point it should be faster than python thread/multiprocessing ?

all the benchmark use stackless python tasklet to compare with python thread lock and queue, that's unfair, cause lock always has low efficiency

see, if use single thread function call without lock it should be as efficient as stackless python

A: 

Focus on functionality first, and performance second (unless you know you have the need).

Most of the time on a server is spent with I/O, so multi-cores do not help so much. If it is mostly I/O that you are working with, multi-threading python may be the simplest answer.

If the server requests are CPU intensive, then having a parent process (be it multi-threaded or not), and respective child processes does make a good bit of sense.

If you really want to scale, you could look at a different platform, like Erlang. If you really want to scale and still use python, you could look at distributed erlang with Python processes managed as Erlang ports on a distributed cluster.

Lots of options, but unless you are dealing with someting big big, you could most likely take a simple approach.

release early, release often.

gahooa
thanks for giving me the advices even my original question was so wide open :P
davyzhang
-1: What about Eve Online, do they use Erlang to manage their Python processes? I find this section not really helpful, and overall the answer contains just random bits and peaces.
nikow
@nikow - are you aware that the answer is in response to a much different question that was edited 5 hours before you left your comment? It's more of an advice-response to a previously-wandering question. Don't see the reason for downvote unless I mis-stated facts or am giving bad advise.
gahooa