atemerev / skynet

Skynet 1M threads microbenchmark
MIT License
1.04k stars 122 forks source link

comparison doesn't make any sense #11

Open Hades32 opened 8 years ago

Hades32 commented 8 years ago

.Net SYNC is not concurrent at all. This would be fast in all languages.

.Net ASYNC does NOT have a million actors at any time. Other implementations probably as well because the task is so easy that they complete faster than they can be spawned.

Sorry, but you should state clearly what you want to compare and then create a fitting benchmark. Currently I fear the only thing you've shown that underlying implementations are very different. But not if they are better or worse at anything bit this particular program...

rkuhn commented 8 years ago

While I agree with the overall assessment, the main reason is that comparing futures with coroutines and actors concerning their instantiation performance does not make much sense because a Future is ephemeral and performs only a single-shot computation while an Actor is remotely addressable, has proper lifecycle management and supervision etc. (a coroutine is somewhat in the middle between these two extremes). This means that one is optimized for creation performance while the other is optimized for longevity.

Nevertheless I have submitted #13 to make the Akka sample more idiomatic (i.e. everything is a message). This reduces the runtime down by a factor of 5 (roughly) on my machine.

wizzard0 commented 8 years ago

Indeed, we're mixing Actors, Coroutines and Futures/Promises here, unfortunately :(

schmitch commented 8 years ago

and CSP style. (goroutines) which somewhere sits between coroutines and actors.

Daxten commented 8 years ago

@schmitch does it really sit inbetween? I would say it's "just" syntax sugar from the compiler and is exactly what Future/Promises are (which are just a abstract syntax over threads)

actors are something different