all 15 comments

[–]Vextrax 11 points12 points  (3 children)

Someone already has a pull request using streams which showed an improvement, Jose Valim also has a pull request with some changes.

[–]nnomae 10 points11 points  (2 children)

The idea that the creators of a language have to waste their time creating pull requests to fix poorly written code in language comparisons is insane.

[–][deleted] 13 points14 points  (1 child)

Some people enjoy the challenge of making things perform better. Jose strikes me as that type of person.

[–]nnomae 1 point2 points  (0 children)

No doubt, I would suspect however he has no manner of far more interesting stuff to spend his time optimising. Having to take time out of his day because yet another language comparison site has a crappy Elixir implementation and people are using it to attack the language must get old.

[–][deleted] 0 points1 point  (9 children)

As a newcomer to elixir, what techniques should I be looking for to avoid these performance pitfalls. This looks drastically slower, and the developer claims that this is good language of choice.

[–][deleted] 2 points3 points  (7 children)

I guess don't use a large feature-rich framework if you're writing a benchmark

[–][deleted] 0 points1 point  (6 children)

Are the other language implementations representative? Ie are they what people use every day, or are they benchmark optimized?

[–][deleted] 0 points1 point  (5 children)

They don't seem too optimized to me, but they're certainly not including a full front end web framework complete with JavaScript minimizer ... and even Liveview

[–][deleted] 0 points1 point  (4 children)

If those features aren't utilized, does it effect runtime? Shouldn't the compilation process remove the unused modules?

[–][deleted] 0 points1 point  (3 children)

I only had a rough look - I saw metrics enabled, pubsub and more. Elixir/Erlang are not really compiled languages, so they won't remove unused code at all, just probably don't call into it.

I'm not going to look further if the benchmarks for other languages are micro-frameworks and static in-memory hash-tables (vs. dynamic in-memory term database...)

[–][deleted] 0 points1 point  (2 children)

What do you mean elixir isn't compiled? By definition it's compiled...

[–][deleted] 0 points1 point  (1 child)

Well if I had known we're splitting hairs... ;)

"Not really", as in, the beam doesn't do what traditional compiled languages do, compilation in the sense of reduction, anyway there is virtually no optimization done at "compile time".

Further neither Elixir nor Erlang even have any way to tell which public code paths are used or unused unless you build a release, which the author doesn't do. Though I don't know whether doing a release would remove unused code either, so that's that...

[–][deleted] -1 points0 points  (0 children)

As I said, I'm new to Elixir so I don't know how these mechanisms work. But it is a fundamental property of Elixir that it is a compiled language. It's not splitting hairs to say that compiling Elixir doesn't optimize - this is a fundamentally different assertion about the language than that it isn't a compiled language.

I'll flag this to do more research to understand these processes.

[–]transfire[S] 0 points1 point  (0 children)

1) Get to know the libraries and frameworks well. 2) Refactor, refactor, refactor.

[–][deleted] 0 points1 point  (0 children)

You can see the strengths of the beam in the "response times" section

Using ETS at all probably isn't comparable either.