Hacker News new | ask | show | jobs
by mtarnovan 2410 days ago
I'm very curious how this CPU performs for Elixir compilation.
2 comments

Compilation should profit pretty linearly from more cores thrown at it. Considering the Erlang VM is very concurrency-conscious it should be a pretty natural fit.

But I'm not at all in on the intricacies of it, are there any particular CPU features (instruction set or module) it's known to take advantage of ?

You mean like vectorized instructions and such? I don't know, but if I had to guess I'd say no.

Anyway, I'm sure there are some compilation phases that won't benefit from more cores, but the bulk of the compilation seems to do so. Even though Elixir has incremental compilation, due to use of metaprogramming in the Phoenix framework sometimes even changes to a single file will trigger recompilation of hundreds of others, so I was thinking these new AMD CPUs with lots of cores could be very helpful here.

Try to ask around Stack Exchange or whatever, I'm certain some people have been running the BEAM on the second generation Threadripper chips (this one being pretty much just a better 16c Threadripper on a consummer socket) since they've been so popular for productivity/compilation.
Indeed, the only compiler benchmark one typically sees are for C/C++. But Lots of developers use other languages, and it would be nice to have a cross-section because each language is so different.

BTW, how much does elixir benefit from multiple cores for compilation?

I haven't done any rigorous testing, but looks compiling the project I'm working on does use all CPUs. There's also this: https://hexdocs.pm/elixir/Kernel.ParallelCompiler.html