News for hackers. Stuff that matters.
Re:Erlang/OTP 24 highlights by rubyn00bie on Wednesday May 12, 2021 @10:43AM (#27130913)
OMG, YES! The JIT is here... and holy crap, if you haven't tried it yet... it's awesome (everything feels snappier). I'm particularly stoked for the receive optimizations and process aliases.

BEAM just gets better and better. It's a good time to be an Erlanger/Elixirist...

Re:Erlang/OTP 24 highlights by sivakon on Wednesday May 12, 2021 @08:41PM (#27137052)
I just ran programs from computer language benchmarks with OTP24. Every program ran considerably faster almost 30% speed up.
Re:Erlang/OTP 24 highlights by latch on Wednesday May 12, 2021 @10:50AM (#27130988)
I was hoping our `mix test` would be faster, but it doesn't appear to be. It would be nice if this got some attention fro the Elixir team.
Re:Erlang/OTP 24 highlights by rubyn00bie on Wednesday May 12, 2021 @11:11AM (#27131262)
`mix test` _is_ fast for me... I've only seen slow tests when folks are misusing timeouts (generally speaking); what problem are you seeing?
Re:Erlang/OTP 24 highlights by latch on Wednesday May 12, 2021 @11:34AM (#27131508)
The delay is all in compiling exs files. It uses Kernel.ParallelCompiler to compile every .exs file, so it's very CPU/core dependent. On my weaker laptop, `mix test` takes nearly 10 seconds to just start.

I've looked into this in more details in the past. We've had success just writing our own test runner and avoiding exs files. But re-implementing things like running tests based on line number, or integrating with external tools (like excoveralls) has been a dealbreaker.

Re:Erlang/OTP 24 highlights by josevalim on Wednesday May 12, 2021 @04:05PM (#27134511)
FWIW, I recently pushed a commit to master that made loading of Elixir's test suite 33% faster (from 15s to 10s): https://github.com/elixir-lang/elixir/commit/2eb03e4a314c0e6...

Unfortunately, it is a bit too large (and too late) for v1.12, but if loading times have been problematic for you, it would be awesome if you could try master out and let us know in the issues tracker (or in the commit) if you see any improvements.

Re:Erlang/OTP 24 highlights by pdimitar on Thursday May 13, 2021 @07:33AM (#27140944)
Can we expect it for 1.13?
Re:Erlang/OTP 24 highlights by josevalim on Tuesday May 18, 2021 @11:47AM (#27196261)
Yes.
Re:Erlang/OTP 24 highlights by ericmj on Wednesday May 12, 2021 @03:01PM (#27133895)
What made your test runner faster? We would be very interested in porting those optimizations to ex_unit.
Re:Erlang/OTP 24 highlights by bostonvaulter2 on Wednesday May 12, 2021 @08:19PM (#27136874)
Are you sure that you're not including application startup in that 10 second measurement? I've seen code bases where horde or some other clustering was enabled in the test env and causing a ~5 second delay on application startup.
Re:Erlang/OTP 24 highlights by lawik on Wednesday May 12, 2021 @01:46PM (#27133086)
Really? I'm surprised that is your test bottleneck. I've mostly seen it be actually slow tests and things that can't be asynced.
Re:Erlang/OTP 24 highlights by the_duke on Wednesday May 12, 2021 @11:52AM (#27131735)
It's noteworthy that the JIT doesn't (yet?) do runtime optimization or specialization, so gains should be moderate. The very low end of double digits.

Not comparable to going from a Javascript interpreter to v8.

But it's a great starting point.

Re:Erlang/OTP 24 highlights by lawik on Wednesday May 12, 2021 @01:44PM (#27133071)
From my recollection (interviewed OTP team on this stuff once) they don't really intend to go there either. They are a very small team comparatively and maintaining that kind of runtime optimization would likely be unwieldy. (https://devchat.tv/elixir-mix/emx-114-just-in-time-for-otp-2...)

It won't be anything like V8, entirely correct, but it brings some VM code to native performance, beating NIFs in some cases.

I think some RabbitMQ tests reported 30% increase in throughput which is pretty wild.

Re:Erlang/OTP 24 highlights by benzible on Wednesday May 12, 2021 @01:59PM (#27133248)
Seems like WhatsApp / Facebook would benefit by contributing some resources towards this...

https://twitter.com/garazdawi/status/1385263924803735556

Re:Erlang/OTP 24 highlights by lawik on Wednesday May 12, 2021 @02:23PM (#27133481)
Arguably, yes :)