4 ms·
Scala is the clear king of speed. Actors are more lightweight than threads, and a shared nothing approach means no locking, so concurrency can be maximized. Ah
by codahale 17y ago
Scala is the clear king of speed. Actors are more lightweight than threads, and a shared nothing approach means no locking, so concurrency can be maximized.
Ah, another person who's never come close to examining Scala's actor implementation. Check out scala.actors.FJTaskScheduler2. It uses threads. That's, uh, kind of the only way to get a JVM process to do things concurrently.
- wynand 17y agoActors are decoupled from the means by which they are executed. Scala has a nice system where you can run thousands of event-based actors in a thread pool. It grows the pool as needed (as threads block). See http://www.scala-lang.org/node/242 http://www.scala-lang.org/node/242 While it may use threads, Scala's actor system effectively allows you to create thousands of actors. Kilim is actually a pure (depending on whether you see a byte-code processing system as pure) Java system that does the same thing (as far as I can tell): http://www.malhar.net/sriram/kilim/ http://www.malhar.net/sriram/kilim/ Kilim's author did a nice Google Talk: http://www.youtube.com/watch?v=37NaHRE0Sqw http://www.youtube.com/watch?v=37NaHRE0Sqw EDIT: Fixed some grammar and added video link.
- therockhead 17y agoMaybe he talking about Scala Event-based actor which has many actors per thread?
- tmountain 17y agoTo compare apples to apples, Clojure's agents are also allocated from a thread pool allowing many agents per thread. I'd imagine you'd see similar performance between the two.