Speeding up Ruby by rewriting C in Ruby

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. truffleruby

    A high performance implementation of the Ruby programming language, built on GraalVM.

    Huh, what exactly doesn't work? Their own readme says "TruffleRuby runs Rails and is compatible with many gems, including C extensions." (https://github.com/oracle/truffleruby)

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. languages

    Compare languages (by bddicken)

    super interesting , actually I am also a contributer of the https://github.com/bddicken/languages and after I had tried to create a lua approach , I started to think of truffleruby as it was mentioned somewhere but unfortunately when I had run the code of main.rb , there was virtually no significant difference b/w truffleruby and main.rb (sometimes normal ruby was faster than truffleruby)

    I am not sure if the benchmark that you had provided showing the speed of truffleruby were made after the changes that you have made.

    I would really appreciate it if I could verify the benchmark

    and maybe try to add it to the main https://github.com/bddicken/languages as a commit as well , because the truffleruby implementation actually is faster than the node js and goes close to bun or even golang for that matter which is nuts.

    This was a fun post to skim through , definitely bookmarking it.

  4. DistorteD

    Ruby multimedia toolkit with deep Jekyll integration 🧪

    > There was a PR to improve the performance of `Integer#succ` in early 2024, which helped me understand why anyone would ever use it: “We use `Integer#succ` when we rewrite loop methods in Ruby (e.g. `Integer#times` and `Array#each`) because `opt_succ (i = i.succ)` is faster to dispatch on the interpreter than `putobject 1; opt_plus (i += 1)`.”

    I find myself using `#succ` most often for readability reasons, not just for performance. Here's an example where I use it twice in my UUID library's `#bytes` method (compare to `String#bytes`) where I use it to keep my brain in “bit slicing mode” when reading the code. I need to loop 16 times (0xF.succ) and then within that loop divide things by 256 (0xFF.succ): https://github.com/okeeblow/DistorteD/blob/ba48d10/Globe%20G...

  5. speed-comparison

    A repo which compares the speed of different programming languages.

    Another language comparison repo that's been going for longer with more languages https://github.com/niklas-heer/speed-comparison.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • TruffleRuby 24.2.0

    1 project | news.ycombinator.com | 20 Mar 2025
  • TruffleRuby 24.2.0 Released

    1 project | news.ycombinator.com | 18 Mar 2025
  • Lets get our facts straight

    2 projects | dev.to | 13 Mar 2025
  • Replacing App Center with GitHub Actions

    4 projects | dev.to | 22 Feb 2025
  • Create a Server Driven CLI from your REST API

    8 projects | dev.to | 18 Feb 2025