Sign in

Benoit Daloze

@eregon.me
505 followers 178 following 340 posts

Expert in dynamic language runtimes and JIT compilation, TruffleRuby lead, Rubyist. eregon.me

PostsRepliesMedia
Benoit Daloze @eregon.me · 22/09/2026
There is a way to force all C extensions to not use a lock: github.com/truffleruby/... Though clearly it is better if the C extensions declare themselves as thread-safe, which many popular extensions do in recent versions. See bsky.app/profile/ereg... which is my recent talk on this very subject.
100
Benoit Daloze @eregon.me · 22/09/2026
> And TruffleRuby, unlike JRuby, keeps a global interpreter lock for Ruby code That's incorrect, TruffleRuby doesn't have a GVL for Ruby code for 10+ years. What you likely see is a C extension not marked as Ractor-safe or Thread-safe, and that then uses a C extension lock for compatibility.
210
Benoit Daloze @eregon.me · 21/09/2026
« If your question is "which Ruby runs my Rails app fastest without changing a line of it," the answer here is TruffleRuby, and it isn't close. » From intertwingly.net/blog/2026/09... by @intertwingly.net. Context: Puma with 1 process and 5 threads serving a simple Rails blog app.
intertwingly.net
Two JITs, Opposite Signs
073
Benoit Daloze @eregon.me · 21/09/2026
Interesting results, thank you for running that and writing about it. The surprising part is slower than other Rubies after the app is simplified by Roundhouse, yet faster before, I'll try to take a look at that when I get some time.
100
Benoit Daloze @eregon.me · 19/09/2026
I had a great time at #EuRuKo 2026 in Brno, an amazing single-track program, many new #RubyFriends, easy to get to and no jet lag, very walkable city, everything incl. food & even karaoke available at the venue. I wanted more karaoke so I organized a second one and it was a lot of fun!
160
Benoit Daloze @eregon.me · 19/09/2026
Looks great, thank you for running that! Would be cool to update rubys.github.io/roundhouse/b... with it to visualize it. Interesting that Native is faster, probably because of the faster calls between C and Ruby for native extensions
100
Benoit Daloze @eregon.me · 18/09/2026
It'd be great to try it on TruffleRuby JVM. I'm not sure if the 20s warmup or 512MB heap is enough, but no better way to know than just trying it.
200
Benoit Daloze @eregon.me · 17/09/2026
Here are the slides for my talk "Running Native Extensions and Ruby Code in Parallel Threads" at #EuRuKo 2026: eregon.me/blog/assets/...
074
Benoit Daloze @eregon.me · 17/09/2026
TruffleRuby runs Doom at, 🥁, 662 FPS! From the talk of @khasinski.bsky.social at #EuRuKo
1122
Benoit Daloze @eregon.me · 17/09/2026
"A language that is kind to humans is kind to AI too" Matz at #EuRuKo
050
Benoit Daloze @eregon.me · 17/09/2026
So Matz is saying you can make Campfire (a Rails app) 5 times faster and use a twelvth of the memory by using github.com/rubys/roundh... + github.com/matz/spinel
1122
Benoit Daloze @eregon.me · 17/09/2026
So part of the reason for Spinel (AOT compiler from Ruby to C) is lower memory usage, because RAM got expensive, and of course performance #EuRuKo
041
Benoit Daloze @eregon.me · 17/09/2026
"When I created Ruby 33 years ago" Matz at #EuRuKo
000
Benoit Daloze @eregon.me · 02/09/2026
> It’s been 8 years since the first just-in-time compiler was introduced in Ruby. > For the first time, the garbage collector is no longer a black box to a Ruby JIT compiler. It would be good to be accurate here and replace Ruby by CRuby, e.g. TruffleRuby was already JITing allocations 10 years ago
040
Benoit Daloze @eregon.me · 31/08/2026
Any reason to not take the train for VIE->Brno? Because of the one change at Wien Hbf?
100
Reposted by Benoit Daloze
GraalVM @graalvm.org · 25/08/2026
GraalVM 25.3 is here!🎉 It brings performance and security improvements, along with updated language runtimes 🚀 Learn more: medium.com/graalvm/graa... Download: www.graalvm.org/downloads/
medium.com
GraalVM 25.3 is here! 🎉
Today, we’re pleased to announce the release of GraalVM 25.3!
0216
Benoit Daloze @eregon.me · 18/08/2026
The idea is that the native stack is gone since we join the Thread (or at least it won't be scanned by the GC) and the registers will reflect the current Thread. `Fiber.new {}.resume` might work too.
000
Benoit Daloze @eregon.me · 18/08/2026
For a while I searched a way to reliably GC an object on CRuby, this is hard given CRuby uses a conservative GC and might keep it alive via the native stack or some register. This seems reliable: m = ObjectSpace::WeakMap.new Thread.new { m[Object.new] = Object.new }.join GC.start p m.keys # => []
110
Reposted by Benoit Daloze
Christian Humer @chumer.dev · 13/08/2026
This is how we made bytecode interpreters in Java competitive with state of the art assembly tuned C interpreters. They partially evaluate like Truffle interpreters at the same time! Integrated in GraalPy, GraalWasm and Crema! Soon in GraalJS! Great work by Yudi Zheng!
152
Reposted by Benoit Daloze
GraalVM @graalvm.org · 13/08/2026
Escaping the Giant Switch: a deep dive into optimizing bytecode interpreters: medium.com/graalvm/esca...
medium.com
Escaping the Giant Switch
a true story about bytecode interpreters
0143
Reposted by Benoit Daloze
Jean Boussier @byroot.bsky.social · 06/08/2026
A history of Ruby's Hash tables, and how we can make them use less memory: byroot.github.io/ruby/perform...
byroot.github.io
Shrinking Ruby Hashes
As you may know, one area of Ruby performance optimization that particularly interests me is memory usage. Given that most Ruby deployments rely on fork, improving Copy-on-Write performance is general...
1329
Reposted by Benoit Daloze
Jean Boussier @byroot.bsky.social · 26/07/2026
While it has been 18 months since I blogged about it, the json gem performance has improved quite significantly since, so now is a good time to add a few more parts to my JSON serie: byroot.github.io/ruby/json/20...
byroot.github.io
Optimizing Ruby’s JSON, Part 8
It has now been about 18 months since I concluded my post series on optimising Ruby’s json.
0233
Benoit Daloze @eregon.me · 24/07/2026
Excited to speak at @euruko.org this year, see you in Brno in September! 2026.euruko.org
2026.euruko.org
EURUKO 2026 — European Ruby Conference · Brno
The annual European Ruby Conference. Two days of talks, community, and hallway hacking in Brno, Czech Republic — September 17–18, 2026.
060
Benoit Daloze @eregon.me · 16/07/2026
Just shipped my first release of the datadog gem! github.com/DataDog/dd-t...
github.com
Release 2.38.0 · DataDog/dd-trace-rb
Added Dynamic Instrumentation: Log probes now support capture expressions as an alternative to capturing the full local/argument scope (#5845) SSI: Add support for Ruby 4.0 runtime (#5981) SSI: Ad...
061
Benoit Daloze @eregon.me · 16/06/2026
concurrent-ruby 1.3.7 is released and fixes 3 security vulnerabilities: github.com/ruby-concurr...
github.com
Release v1.3.7 · ruby-concurrency/concurrent-ruby
There are 3 security fixes in this release, so updating is recommended. These security vulnerabilities are not very likely to be hit in practice and have a corresponding Low severity score. What's...
0114
Reposted by Benoit Daloze
The Verge @theverge.com · 12/06/2026
While his mountain of horrible personal conduct could fill multiple books, one fact in particular stands out: A year ago, Musk’s actions directly led to the deaths of hundreds of thousands of people. He did it knowingly. And, worse — gleefully. Read more: www.theverge.com/tech/949259/...
Verge headline: The world's first trillionaire is a killer
by TC Sottek

Image of Elon Musk doing a "fascist salute" in the form of an oil painting on a wall
28589643758
Reposted by Benoit Daloze
Jean Boussier @byroot.bsky.social · 05/06/2026
I realized it has been ~1.5 years since I concluded my series of post on JSON optimization. So I got curious how much faster it became since then. 2.7.2 was the last version before I took over maintainership. 2.9.0 was the version I released at the end of the blog series.
3498
Reposted by Benoit Daloze
Max @bernsteinbear.com · 03/06/2026
Inlining: the hard parts bernsteinbear.com/blog/inlinin...
bernsteinbear.com
A survey of inlining heuristics
Compilers, especially method just-in-time compilers, operate on one function at a time. It is a natural code unit size, especially for a dynamic language JIT: at a given point in time, what more infor...
0184
Benoit Daloze @eregon.me · 01/06/2026
You know it's going well when typing 'github' in my browser has www.githubstatus.com as the first suggestion ...
020
Reposted by Benoit Daloze
Max @bernsteinbear.com · 27/05/2026
New linear scan register allocator in ZJIT by @tenderlove.dev ! railsatscale.com/2026-05-27-a...
072
Benoit Daloze @eregon.me · 14/05/2026
What if Ruby 4.0 features could be implemented in pure Ruby? With TruffleRuby, that’s possible: 73% of the core library is written in Ruby itself. We currently have 10 issues tagged [easy, pure Ruby] waiting for contributors: github.com/truffleruby/...
github.com
Ruby 4.0 support · Issue #4231 · truffleruby/truffleruby
Any help is appreciated whether it is: implementing one of the Ruby 4.0 changes in TruffleRuby, and ensuring it is tested in specs or MRI tests and otherwise add specs. If adding specs please leave...
042
Benoit Daloze @eregon.me · 08/05/2026
I installed the Codex extension in VSCode, the result is it corrupts (!) my git repository when using VSCode as the git editor (EDITOR='code -w'). Filed github.com/openai/codex..., was a pain to figure it out.
010
Benoit Daloze @eregon.me · 05/05/2026
It seems to be macOS-only or maybe clang-only for now.
000
Benoit Daloze @eregon.me · 05/05/2026
More details in github.com/DataDog/dd-t... and how it can cause CI to fail in a very subtle way on 3.3.11 but not on 3.3.10 or any other version!
110
Benoit Daloze @eregon.me · 05/05/2026
New take about Ruby C extensions: append_cflags "-Wall" or "-Wextra" with -Werror is a bug waiting to explode as it overrides -Wno-$category flags from RbConfig by being added at the end. It's unnecessary too because for Ruby 1.9+ RbConfig::CONFIG["warnflags"] starts with "-Wall -Wextra"
110
Benoit Daloze @eregon.me · 28/04/2026
We'd need to statically link libssl and libyaml, set the CA certs path at runtime, support old Linux and macOS, Linux can be done in Docker but macOS requires older machines unless we're OK with macOS 15+ only (the minimum GitHub provides). And look into extra steps in github.com/jdx/ruby + testing
000
Benoit Daloze @eregon.me · 28/04/2026
Probably yes, see github.com/ruby/setup-r... for the issues with --enable-load-relative that I found back then. Maybe such builds should be just at github.com/ruby/ruby-bu... though, I've been thinking about it, but also it's more complicated than just using --enable-load-relative:
100
Benoit Daloze @eregon.me · 28/04/2026
Nice post and great to see you blog about Ruby! One thing I'm missing in the blog post is what are the new optimizations in Mustermann 4 which make the performance much better? Maybe something like merging routes Regexp more often or so?
000
Benoit Daloze @eregon.me · 28/04/2026
Not only @github.com search is broken for PRs for 24+ hours but also just the list of PRs misses some PRs entirely. I have to resort to email to even find my own PRs now.
020
Reposted by Benoit Daloze
Konstantin Haase @rkh.cool · 27/04/2026
Mustermann 4.0 released! sinatrarb.com/2026/04/27/m...
Performance comparison of various Rack-based routers.Performance comparison of Sinatra with Mustermann 3.1 vs Sinatra with Mustermann 4.0
472
Benoit Daloze @eregon.me · 28/04/2026
There are some issues reported at github.com/jdx/mise/dis... but they seem to have been fixed.
github.com
Precompiled Ruby Binaries · jdx mise · Discussion #7268
We're excited to announce experimental support for precompiled Ruby binaries in mise! This can dramatically reduce Ruby installation time from several minutes (compiling from source) to just second...
000
Benoit Daloze @eregon.me · 28/04/2026
Yeah it's complicated (e.g. libssl and CA certs) though possible because TruffleRuby always ships precompiled and there is no known issue. CRuby has --enable-load-relative but that's not so well tested and for old Ruby versions even `gem i rake` would fail.
100
Benoit Daloze @eregon.me · 28/04/2026
A good time to switch (pun intended) is when setting up a new machine
100
Benoit Daloze @eregon.me · 28/04/2026
I wish but it sounds unlikely, changing Ruby version Switcher is rather cumbersome (need to reinstall Rubies, learn the new tool, etc) so many people just keep using what they are used to. On a similar note I have a chruby shell function using rbenv/mise because muscle memory and it's shorter.
100
Benoit Daloze @eregon.me · 27/04/2026
Maybe I should do another blog like eregon.me/blog/2021/06... but the TLDR is: use mise, the other Ruby Switchers don't come close (chruby sets GEM_HOME which causes various issues). In terms of Ruby installers, ruby-build is still the best and is used by both mise and rbenv.
110
Benoit Daloze @eregon.me · 27/04/2026
I have been trying mise (from @jdx.dev) and rbenv recently, the winner is clear: $ time ruby -e0 mise: 51ms rbenv: 152ms 100ms overhead is way too much (due to shims). Additionally: * rbenv breaks `which` which causes tricky problems. * mise can install precompiled Rubies (much faster)
293
Benoit Daloze @eregon.me · 27/04/2026
I guess it only works on CRuby since it's using RubyVM, right? Maybe we should have proper public API hooks for require, OTOH it can make it harder to e.g. cache bytecode/IR then with a String->String hook. For the Rails case isn't it enough to use RuboCop?
100
Benoit Daloze @eregon.me · 24/04/2026
Slides: docs.google.com/presentation...
docs.google.com
RubyKaigi 2026 Making Hash Parallel Thread-Safe and Fast
Making Hash Parallel, Thread-Safe and Fast! 1 Benoit Daloze
020
Benoit Daloze @eregon.me · 24/04/2026
Matz made a AOT compiler for a subset of Ruby: github.com/matz/spinel Great speedups but does not support metaprogramming
github.com
GitHub - matz/spinel
Contribute to matz/spinel development by creating an account on GitHub.
050