5 ms·
Eight Myths of Erlang Performance
- thomasmallen 18y agoWould've been so much cooler if they were actually written as classical myths, ham-handedly replacing prominent characters with Erlang and functional programming terms.
- davidw 18y agoHrm.... * Erlang: Hydra. * Tail recursion: Jörmungandr. Ok, that's the low hanging fruit.
- alecco 18y agoHi. (not flaming, really asking) Can any erlang guru explain in a few lines why Erlang on a quad-core linux systems doesn't beat Java? Ubuntu™ : Intel® Q6600® quad-core http://shootout.alioth.debian.org/u32q/erlang.php http://shootout.alioth.debian.org/u32q/erlang.php Ubuntu™ : Intel® Q6600® quad-core x64 http://shootout.alioth.debian.org/u64q/erlang.php http://shootout.alioth.debian.org/u64q/erlang.php This surprised me after being told many times by a friend who does Java+Erlang programming otherwise. What's missing in the picture? Is that Erlang implementation not multicore aware or something?
- davidw 18y agoJava is faster. Erlang doesn't automatically use all the processor cores, it just makes it easier to divy work up that way than threads do. It's not a magic bullet, in other words:-)
- igouy 18y agoWhat's being measured? From the homepage: "we measure particular programs". Have the Java programs been re-written for multi-core? Have the Erlang programs been re-written for multi-core? Have you looked at the individual benchmarks? Have you looked at the individual programs?
- alecco 18y agoIsn't the erlang pitch it makes multiprocessing transparent?
- discipulus 18y agoChapter 20, "Programming Multicore CPUs", in Joe Armstrong's book, he says "If you want your application to run faster on a multicore CPU, you'll have to make sure that it has lots of processes, that the processes don't interfere with each other, and that you have no sequential bottlenecks in you program."
- schtog 18y agoI'm no expert but obviously you could code some specific program to perform superwell given unlimited amounts of time. So the question is, given X amount of time to create a program, which runs faster? Not, given unlimited amounts of time, which is faster? So tests like this don't necessarily reflect the real world. That said, I don't really know which way it is, JAVA or Erlang, just sayin... :)
- orib 18y agoSure. So it's easier to make programs that scale well. However, given sufficiently low-level primitives, you can completely emulate the Erlang model, with problem-specific extra hacks to help performance. No, it's not as easy. It's possible to make it perform much better, though, through micro-optimization of the specific operations needed. It's similar to doing a problem in assembly. On the macro level, it takes far less effort to make a performant system in a high level language, however for simple algorithms that are commonly used, you can typically get a threefold speed improvement by doing them in assembly, for a significant increase in implementation effort. Wow, I never thought I'd compare Java to assembly.
- igouy 18y agoNo! The Erlang pitch is "Distributed, reliable, soft real-time concurrent systems". Distributed supervised processes are a mechanism to achieve error containment and fault tolerance. "making reliable systems in the presence of software errors" (pdf) http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf