News for hackers. Stuff that matters.
Re:Unpacking Elixir: Real-Time and Latency by impulser_ on Saturday September 09, 2023 @09:47PM (#37452139)
Erlang, which Elixir compiles to, is literally built for low latency. It prioritizes latency while almost every other language prioritizes throughput.
Re:Unpacking Elixir: Real-Time and Latency by edvinbesic on Saturday September 09, 2023 @10:31PM (#37452366)
Is it fairer to say that Elixir compiles to Erlang or that Erlang & Elixir compile to Beam byte code?

Genuine question.

Re:Unpacking Elixir: Real-Time and Latency by di4na on Saturday September 09, 2023 @10:49PM (#37452450)
Neither but the former is closer to it.
Re:Unpacking Elixir: Real-Time and Latency by swixmix on Saturday September 09, 2023 @10:54PM (#37452472)
"Elixir compiles into BEAM byte code (via Erlang Abstract Format). This means that Elixir code can be called from Erlang and vice versa, without the need to write any bindings. All Elixir modules start with the Elixir. prefix followed by the regular Elixir name."

From https://elixir-lang.org/crash-course.html "Erlang/Elixir Syntax: A Crash Course"

Re:Unpacking Elixir: Real-Time and Latency by di4na on Sunday September 10, 2023 @02:48AM (#37453496)
Yes, the Erlang Abstract Format is at least half a dozen IR above the bytecode, and lowering this is done by the erlang compiler.
Re:Unpacking Elixir: Real-Time and Latency by vgatherps on Sunday September 10, 2023 @02:37AM (#37453456)
Erlang is built for easily achieving fairly low and reliable latencies, with easy distribution/concurrency primitives, and building highly reliable systems.

It’s not very good for “make packet in to packet out as fast as possible at the cost of all else”. All of the abstraction layers come at a performance cost and aren’t all useful in the first place for low latency trading systems.

Re:Unpacking Elixir: Real-Time and Latency by lawik on Sunday September 10, 2023 @05:46AM (#37454338)
Yeah, I think I adressed this in the article and I hope it came across. If latency is the one singular goal the design should be quite different.