|
|
|
|
|
by eranation
4100 days ago
|
|
Do you mean co-routines / user threads / green threads?
I tend to agree it can have a serious performance boost in some cases. Not sure why you were down voted. There is actually a library for java that adds it via byte code instrumentation (quasar or something) although not sure it will work for scala. But saying that actor model is bad practice, I'm not sure that I accept it. Maybe on a single muticore but once you start talking distributed computing (e.g. Spark which is Akka based) then all this "avoid crossing to the kernel" optimization is becoming a drop in the ocean. |
|
Here is an example of a small single threaded program beating out a number of distributed graph frameworks running on 128 cores, with a 128 billion edge dataset.
http://www.frankmcsherry.org/graph/scalability/cost/2015/02/...
Performance matters because it enables simplicity. If your language forces you to pull in multiple machines to solve your problem then its turned a simple program into a distributed system and life gets complicated fast. Just throwing more cores at a program without understanding why its slow will just get you into trouble.
Multithreaded programs and distributed programs should be a scary last resort after making absolutely sure you can't get away with the simple solution.