| > But as mentioned before, web developers can greatly benefit from Elixir. I'm not saying they wouldn't. I just object against calling Elixir "fast",
because it's not. It's just used in the places where raw sequential processing
speed is not what makes the difference. It only makes up for that loss because
it doesn't degrade when the same procedure is executed many times
simultaneously, which is very hard for anything that's not BEAM (or Go, so
I hear). >> I doubt it, unless Ruby (MRI is what I think of) is an extremely poorly written interpreter. > I wrote several things in both languages. CSV parsing is pretty much the same speed, again file handling in Erlang/Elixir. Funny. I expected MRI to be as fast as Perl or Python. What you say means it's
much slower. > When it comes to real web apps, Elixir is usually faster by a factor of 10x when DBs are involved and 100x when it comes to plain rendering. Unless I see how the comparison was arranged, I have trouble to believe that.
I've seen BEAM being very slow for sequential workload, and there's no
mechanism that would explain the speedup right off the bat, barring the
possibility of comparison looking at apples and oranges (e.g. comparing raw
SQL queries in Elixir to Django's ORM). |
1) The situation might have changed since you looked at this
2) The algorithm to do the work might have been suboptimal (for example, not taking advantage of pattern-matching, or using regex which everyone agrees is too slow in Erlang/Elixir)
3) for large files, there's some fiddly techniques that make things noticeably faster, see for example http://cloudless.studio/articles/12-elixir-vs-ruby-file-i-o-...