News for hackers. Stuff that matters.
Re:Elixir v1.3 released by andy_ppp on Wednesday June 22, 2016 @07:22AM (#11952917)
You can also compile Elixir and Erlang to native code if you want it to run computational stuff faster...
Re:Elixir v1.3 released by ngrilly on Wednesday June 22, 2016 @08:40AM (#11953384)
> You can also compile Elixir and Erlang to native code

How? Can you provide a link about this?

Re:Elixir v1.3 released by andy_ppp on Wednesday June 22, 2016 @09:05AM (#11953542)
Add this at the top of your module (in Elixir):

@compile [:native, {:hipe, [:verbose, :o3]}]

:-o

Re:Elixir v1.3 released by ngrilly on Thursday June 23, 2016 @02:49AM (#11959282)
Hi forgot about HiPE :-)

But it doesn't produce a native binary, does it?

Re:Elixir v1.3 released by andy_ppp on Thursday June 23, 2016 @04:54AM (#11959661)
Where did I claim it did?
Re:Elixir v1.3 released by ngrilly on Thursday June 23, 2016 @05:40AM (#11959794)
Nowhere :-) I read too fast and mistakenly assumed native code = native executable binary.

Is using HiPE a standard practice in the Erlang/Elixir community? What is the quantitative performance gain?

Re:Elixir v1.3 released by lucidstack on Thursday June 23, 2016 @07:52AM (#11960265)
This comment from Reddit sums it up pretty well: https://www.reddit.com/r/elixir/comments/3gd1n3/what_are_the...

I just discovered about HiPE as well, and I just gave it a try with a simple fibonacci module. Running fibonacci(40) went from 3.9s BEAM to 0.7s HiPE.

I know it's a silly test, but it's pretty sweet to witness such a massive difference out of the box. :)

Re:Elixir v1.3 released by ngrilly on Thursday June 23, 2016 @09:06AM (#11960548)
Thanks for the link.

I won't say testing HiPE with fibonacci is silly because this is exactly the kind of numerical computation where we expect HiPE to be useful: it looks like it is :-)