I am new to Scala/Akka, although I am very well familiar with the concept of actor-based modeling. I am trying to parallelize an existing code for better performance, and I have two versions: one in Scala/Akka and one in Java 7's ForkJoinPool.
I was expecting that the actor-based approach should be faster, but the result is the other way round. It is something like 20 sec for Scala/Akka versus 17 sec for Java fork/join.
I'd like to know if akka is intrinsically slower? Or could it be because I am using the classes from the existing code written in normal Java in my both implementations?
Akka is using the ForkJoinPool in some of its implementations of its Actors framework (See Java 7 ForkJoinTask and Akka 2.0), so it is expected to be slower when running. In opposition, its made to be easier to work with on the developer side, you choose which side you prefer: development speed or running speed!
For the second question you might want to split it into another SO question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With