mfilej

mfilej

Anyone received their new MacBook Pros today?

I think a bunch of us will be interested in hearing how the new M1 Pro/Max compare to the regular M1 when compiling and running Elixir code. If you have experienced any 2 of the 3, please share!

Most Liked

dvic

dvic

I have just merged tried the ARM JIT PR (jit: Add support for 64-bit ARM processors by jhogberg · Pull Request #4869 · erlang/otp · GitHub) into the OTP 24.1.3 release, which gives me OTP 24 + JIT on ARM :slight_smile:

You can try it out with the following (using ASDF):

export OTP_GITHUB_URL="https://github.com/qdentity/otp"
asdf install erlang ref:v24.1.3
asdf local erlang ref:v24.1.3

Running the snippet from https://twitter.com/akoutmos/status/1453558037063639040

{time, _} = :timer.tc(fn -> 1..5_000_000 |> Enum.reduce(0, fn number, acc -> acc + number end) end)
System.convert_time_unit(time, :microsecond, :millisecond)

finishes in 1s, which is very nice compared to the 1.7s the AMD Ryzen 9 3950X in the tweet achieved! Someone also ran it with the OTP 25 development branch and achieved the same same result (1s).

Other improvements to mention here: full recompile on a large project:

37 seconds (Macbook Pro 2017 best i7)
vs
23 seconds (Macbook Pro M1 16 inch 10-core)

Partial recompile on same project (recompiling 42 files):

17 seconds (Macbook Pro 2017 best i7)
vs
5 seconds (Macbook Pro M1 16 inch 10-core)

Overall, very nice speed-ups :slight_smile:

joseph-lozano

joseph-lozano

For anyone that comes by later, you can dramatically speed up compilation times by either:

  1. Using the Homebrew version of Erlang
  2. Using the KERL_CONFIGURE_OPTIONS from the Homebrew formula.

I used:

export KERL_CONFIGURE_OPTIONS="
      --disable-debug \
      --disable-silent-rules \
      --enable-dynamic-ssl-lib \
      --enable-hipe \
      --enable-shared-zlib \
      --enable-smp-support \
      --enable-threads \
      --enable-wx \
      --with-ssl=$(brew --prefix openssl@1.1) \
      --without-javac
      --enable-darwin-64bit \
      --enable-kernel-poll \
      --with-dynamic-trace=dtrace \
      "

my thinking is that --enable-darwin-64bit is doing the heavy lifting

11
Post #8
joseph-lozano

joseph-lozano

That same compile that took 10 minutes now takes about 1:30, so about 2x faster than the macbook air.

Where Next?

Popular in Discussions Top

praveenperera
How We Replaced React with Phoenix By: Thought Bot
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New
fireproofsocks
This is more of a general question, but I’m wondering how other people in the community think about the pattern matching in function sign...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New
laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement