RSSAmplifier

Blog

On the Edge of Ruby

A blog about Ruby, Performance and Concurrency

eregon.meRSS feed ↗10 posts

Latest posts

Contributions to ruby/spec

As a maintainer of ruby/spec I sometimes wonder how much each Ruby implementation contributes to ruby/spec. Without further ado, here it is:

Matching Regexps 200 Times Faster

You might have seen @byroot’s excellent blog post series on optimizing the json gem . From the first blog post it’s clear most of the time for generating JSON is spent in generate_json_string() and specifically in convert_UTF8_to_JSON() , i.e., in converting Ruby Strings to JSON Strings. Because this is such a hot part of JSON generation, it has received a lot of attention. In part 3 @byroot shows…

Benchmarking Ruby Parsers

The new Prism parser has become the default in Ruby 3.4.0 preview 2.

Benchmarking CRuby, MJIT, YJIT, JRuby and TruffleRuby

In this blog post we benchmark many Ruby versions and the latest Ruby Just-in-Time compilers (JITs) on the newest Ruby benchmark suite, yjit-bench. As a teaser, the geometric mean speedups compared to CRuby 3.1 on these 14 benchmarks are: MJIT 1.26x, YJIT 1.39x, JRuby 1.86x and TruffleRuby 6.23x. Read on to find more about the benchmarks and gain insights on these speedups. This blog post is also…

Review: Ruby Installers and Ruby Switchers

In this post I review the most popular Ruby installers (making it easier to install a Ruby) and Ruby switchers (to switch between different Rubies conveniently).

Correct Delegation with Ruby 2.6, 2.7 and 3.0

While looking at how a few gems handle delegation on Ruby 2.7, I noticed that many of them are unfortunately incorrect. The official blog post about keyword arguments changes in Ruby 2.7 and Ruby 3.0 is rather long and might be unclear. So I will keep this one really short and to the point.

The Ruby Spec Suite Compatibility Report

Introduction

A Migration Path to Bundler 2+

Bundler 2 did not arrive quietly. It was noticed by almost every CI build failing when running bundle install. As a result, it seems many still avoid Bundler 2 and just use Bundler 1. In this post, I present some ideas on how to get more people to use Bundler 2, and no longer need Bundler 1 which will not be maintained forever.

The Delegation Challenge of Ruby 2.7

Ruby 3.0 will introduce the separation between positional and keyword arguments. The upcoming Ruby 2.7 release aims to introduce warnings for every argument behavior that will change in Ruby 3.0 to ease migration. However, delegation that works for Ruby 2.6, 2.7 and 3 seems a hard problem to solve.

A New Expectation Syntax for ruby/spec

ruby/spec is a test suite for the behavior of the Ruby programming language. The utility to run the test suite is called MSpec and is very similar to RSpec 2.