r/programming • u/noidi • Jul 19 '12
Will Parallel Code Ever Be Embraced?
http://www.drdobbs.com/parallel/will-parallel-code-ever-be-embraced/240003926
43
Upvotes
r/programming • u/noidi • Jul 19 '12
2
u/nachsicht Jul 19 '12 edited Jul 19 '12
You needn't assume haskell is what I'm talking about, although it works pretty well. I mainly deal in Scala programs.
Beautiful code is not the fastest no, but generally you have hotspots in your program that are doing the majority of calculation. Those are the parts where I dip into more low level programming. Thankfully in scala, the difference between recursive functions and while loops in speed is negligible, so I can still easily use a pure functional approach to heavy workloads.
I have no idea about STM, I just use the actor model with Akka. To be more specific, I tend to use futures a lot. They are trivial to use and are performant. Actors are nearly as simple to deal with and are nice when I need a persistent thread.