🚀 Another thrilling episode of "Why Memory Management Will Save Humanity" presented by CRuby's *finest* minds. 🎓 Spoiler: it involves a PDF that your browser definitely can't handle. And yes, it’s all made possible thanks to a visionary #collaboration with... the Australians? 🌏
https://railsatscale.com/2025-09-16-reworking-memory-management-in-cruby/ #MemoryManagement #CRuby #Technology #Innovation #Australia #HackerNews #ngated
Reworking Memory Management in CRuby

Shopify sponsors and collaborates with academia to take Ruby to new heights. In this post, we give an overview of what we’ve built in collaboration with the Australian National University.

Rails at Scale
Reworking Memory Management in CRuby

Shopify sponsors and collaborates with academia to take Ruby to new heights. In this post, we give an overview of what we’ve built in collaboration with the Australian National University.

Rails at Scale

[Перевод] Ускоряем Ruby, переписав C… на Ruby

В последнее время я часто видел обсуждения репозитория сравнения языков . В нём CRuby был третьим снизу, обгоняя по скорости только R и Python. Автор репозитория @BenjDicken создал забавную визуализацию производительности каждого из языков. В одной из визуализаций из визуализаций Ruby по бенчмаркам Ruby оказывается третьим с конца.

https://habr.com/ru/articles/864504/

#cruby #yjit #виртуальная_машина #vm #бенчмарки

Ускоряем Ruby, переписав C… на Ruby

В последнее время я часто видел обсуждения репозитория сравнения языков . В нём CRuby был третьим снизу, обгоняя по скорости только R и Python. Автор репозитория @BenjDicken   создал забавную...

Хабр

I'm currently trying to get #RubyLang 3.3.1 to compile with `--enable-yjit` set. For some reason, the newest #CRuby version won't build on Sonoma because #RustLang is missing some include or header required for the latest #YJIT to be built.

It seems to be a problem with #rustc. I'm trying with #rustup instead, and will see how that goes.

Ah, nothing like posting on #StackOverflow to toughen up one's sense of self! I typically only answer the tricky questions there, so dealing with criticism of minor oversights, off-by-ones, and conversion errors are part of the fun. Ever try converting µs to femtoseconds when #benchmarking iterations on large data sets? Less fun than you think!

On the other hand, #TruffleRuby for the performance win. 900% faster for this use case than #CRuby, even with #YJIT.

https://stackoverflow.com/a/78263220/1301972

Why Ruby `num >> 1` is slower than `num/2`

i surprised that Ruby num >> 1 is slower than num/2 since i always thought that bit operators should faster than normal operators. # ruby 3.0.3 require "benchmark/ips" Benchmark.i...

Stack Overflow
and if you're interested in CRuby VM internals, this is the API documentation I read when writing the digest-crc C extensions.
https://silverhammermba.github.io/emberb/c/
#ruby #cruby #cExtensions #cexts
The Ruby C API

👍 for fuzzing Ruby C extensions. I still don't fully trust that every C extension properly handles converting Ruby INTs into unsigned integers or back again. Also a good deep dive into CRuby's Coverage module internals.
https://blog.trailofbits.com/2024/03/29/introducing-ruzzy-a-coverage-guided-ruby-fuzzer/

Still, grepping for system, send, (instance|module|class)_eval method calls will yield low hanging fruit faster than fuzzing every single logic branch. Also, if you just want to find untested/unhandled edge-cases, there's also a [commercial] Mutation Testing framework for Ruby called Mutant.
#ruby #cruby #appsec #fuzzing

Introducing Ruzzy, a coverage-guided Ruby fuzzer

By Matt Schwager Trail of Bits is excited to introduce Ruzzy, a coverage-guided fuzzer for pure Ruby code and Ruby C extensions. Fuzzing helps find bugs in software that processes untrusted input. …

Trail of Bits Blog
@ruby_discussions As much as I dislike promoting anything #Java or Oracle related, I have to say that a lot of my #RubyLang code (so long as it doesn't require forking) runs ~1 gazillion times faster on #TruffleRuby than #CRuby even with #YJIT enabled. It's now my default for certain types of performance-oriented code, especially for threading.

If you're trying to update the #OpenSSL gem on #macOS for #TruffleRuby, you may need this to link with OpenSSLv3's #libssl library:

```bash
OPENSSL_PREFIX="$(brew --prefix openssl@3)" gem update openssl
```

Just replace "@3" with "@1.1" if you prefer OpenSSLv1.1 for whatever reason. Meanwhile, #CRuby still doesn't compile against v3 for me, but YMMV.