@adamtaggart They make heated driveways and walkways for melting snow. If you are building a new driveway consider putting a snowmelt system in it. You run a heated glycol mix through pex tubing.
@drogus I don't. I asked Claude to run the tests. If you want you could ask AI to replicate the test. Point it to this tweet and it might be able to do it.
Elixir is very good at handling many connections without breaking. So you don't need to give it any special attention for good performance. Here a benchmark with a lot of clients posting to the once-campfire repos. Elixir mops the floor with the Rust versions.
The problem with all of this that keeps getting glossed over is that Elixir is requiring all of this special attention to get it to the numbers it can achieve. I also believe those numbers under represent Elixir's potential but this isn't a "which is fastest" benchmark. It is "which is fastest without knowing how to write in that stack" benchmark.
@bloodyarra@ryanwinchester@josevalim The graph shows that the Rust implementation fails to function well. And that’s after more than just a couple of prompts.
@jamiebrough@dmitriid The commit SHAs are there. You can find all of them in the official repositories except the Elixir improved one. But the Elixir one shot is there. BEAM works for WhatsApp and running 5G telephony. Let WhatsApp know if you have a better solution.
The Rust ccec30 commit took many passes of performance improvements. And it is still worse under this kind of load than the "one shot" Elixir version (3498c18).
The AI agents didn't catch this issue with the Rust code. Nor Go for that matter.
@MattStopa@LLCoolChris_@acrogenesis@worzit@ZachSDaniel1 You wrote the BEAM isn’t valuable. But WhatsApp is built on it and was sold for billions a long time ago.
Are you going to dismiss Whatnot too? Whatnot is a company that uses Elixir for its auctions and is worth billions.
I took a stab at improving the performance of Elixir. I used the PR for Elixir that @ZachSDaniel1 posted and worked some more on it. In the benchmark Elixir is now faster than Rust (ccece30 newest commit) for the Sidebar and Search benchmark.
Last conversion of the Campfire from my token stash goes to JavaScript/Express. As with the others, I'm sure you can find more to optimize. But this gives you a sense of what order of magnitude these options exist within with agent-led development. https://t.co/UUapL99SJE
@MattStopa@pggalaviz@worzit@ZachSDaniel1 There are a bunch of billion-dollar companies using Elixir. Another one is Whatnot.
It is also used by some trillion dollar companies.
I took a stab at improving the performance of Elixir. I used the PR for Elixir that @ZachSDaniel1 posted and worked some more on it. In the benchmark Elixir is now faster than Rust (ccece30 newest commit) for the Sidebar and Search benchmark.
@quatermain32@ZachSDaniel1 No, not fixed as far as I know. I didn’t make any changes to the Rust code. I wrote improved because it had many performance improvements done to it after earlier versions.
It would be interesting to compare performance for different levels of load where drops are a failure.
@jskalc@dhh Yes, the benchmarks are not that realistic, but it was still interesting to see how Elixir could perform there. If Rust gets cache hits the others get to as well.
"In an overload situation, the rust implementation delivers a whopping 1% of messages to all connected clients, and the Elixir implementation delivers 100% of messages to all clients, applying natural backpressure to writes."
I have a branch with various performance improvements to the Elixir version, focused on specifically the websocket side of things. I didn't spend much time on the rest.
The load generation code was flawed in overload scenarios because any socket that had an issue just stayed disconnected forever, so I assume no benchmarks were run in this fashion prior. Now those reconnect on disconnect and continue sending traffic (a more realistic scenario).
Most relevant finding:
In an overload situation, the rust implementation delivers a whopping 1% of messages to all connected clients, and the Elixir implementation delivers 100% of messages to all clients, applying natural backpressure to writes.
Speed is cool. Rust is fast. Speed is not even close to the most important thing when building real applications.
There were **18** performance pull requests to the Rust codebase to get the numbers originally reported, compared to one performance pass to both Elixir and Go versions. However, the Go version was ported from the optimized Rust version.
@marcelaodev@josevalim@ZachSDaniel1 Not that hard. I basically I asked Claude to improve the performance and look at the improvements done to the rust repo. The rust implementation was not that fast in the beginning either. See https://t.co/QH4eHqMP2w
Oh FFS. It turns out the req/s in the initial vibed Rust version is within the same order of magnitude as the initial vibed Elixir/Go versions, and even performs worse in some of them.
The history is in the repository! The Rust version only got faster with a bunch of additional work. The initial Elixir/Go versions presented in the tweet below saw none of this additional work. It was comparing a 300 commits Rust version with a 2-3 commits Elixir/Go version.
Source: https://t.co/0kuvLVU4iw