3 ms·
How does it compares to Java and C in performance?
by owebmaster 10y ago
How does it compares to Java and C in performance?
- brightball 10y agoThat's a loaded question because it's not built for performance, although it's still very fast. It's built for realtime and consistent performance specifically. The trade off there is prescheduling, where the VM caps execution time of processes in the scheduler guaranteeing that a heavy process isn't allowed to take over the machine VS cooperative scheduling where the code has to periodically check in with the scheduler to relinquish control. Prescheduling won't be faster in a benchmark, but if you have millions of small requests their response time will remain consistent in the face of bad actors or infinite loops trying to takeover the machine.
- tim333 10y agoFor math type benchmarks of the order of 2-10x slower http://benchmarksgame.alioth.debian.org/u64q/erlang.html http://benchmarksgame.alioth.debian.org/u64q/erlang.html For this web framework test Phoenix (Elixir) does almost as well as Play (Java) https://github.com/mroth/phoenix-showdown https://github.com/mroth/phoenix-showdown The benchmarksgame's site quotes "Most (all?) large systems developed using Erlang make heavy use of C for low-level code, leaving Erlang to manage the parts which tend to be complex in other languages, like controlling systems spread across several machines and implementing complex protocol logic." So it depends I guess.
- owebmaster 10y agoThanks Tim, this is exactly what I was looking for. It seems to be no big draw to use elixir to web development compared to java and C.