log in    sign up

Ruby Benchmarking and Performance

Ruby Benchmarking and Performance

Want to understand the ins and outs of the Ruby interpreter's performance? Here are a series of articles explaining relevant parts of the interpreter and how you can optimise them. These are very ground-level, with a strong emphasis on the details of current Ruby specifically.

(Log in to track progress or opt into emailed reminders.)

Profiling and Benchmarking 101

Are you new to benchmarking for performance? Ruby performance expert Nate Berkopec gave a great talk on this at RailsConf.

(Log in to track progress)

JIT and Ruby's MJIT

How does JIT work in Ruby? How is it different from other languages? Ruby's JIT uses a very unusual approach to satisfy some unusual requirements from the Ruby Core Team.

(Log in to track progress)

Can I Use Ten 10% Speedups to Make Ruby Instant?

The math behind performance, benchmarking and speedups can be a little bit subtle. Here, we'll talk about how to do that math, and verify that other developers have done it correctly.

(Log in to track progress)

Six Years of Ruby Performance History

A deep exploration of Ruby multiprocess and multithread performance in a trivial Rails app.

(Log in to track progress)

Where Does Rails Spend Its Time?

How do you profile a large Ruby or Rails application? This article will tell you, mostly using Discourse and Rails Ruby Bench as an example app and workload for StackProf.

(Log in to track progress)

Determining Ruby Process Counts: Theory and Practice

How do you determine the right number of processes and threads for your performance-critical Ruby application?

(Log in to track progress)

Microbenchmarks vs Macrobenchmarks: What's a Microbenchmark?

You'll see people talk about different 'sizes' of benchmark. What does that mean? Why does it matter?

(Log in to track progress)

How Close is Ruby 3x3 for Production Web Apps?

What does a macrobenchmark measure? After reading the explanation above, this video will show you the kind of thing a macrobenchmark can measure about real-world Rails performance on a reasonably typical workload.

(Log in to track progress)

Measuring Rails Overhead

Do you ever wonder how much extra overhead Rails adds? This is both a measurement of that, and an explanation of how you'd measure it.

(Log in to track progress)

A Story of Passion and Hash Tables

Ruby 2.4 got faster hash tables. Here's the story behind an engineering duel to choose who got to write those hash tables.

(Log in to track progress)

Optimisation Techniques of the Benchmark Winners

In this RubyKaigi keynote, Jeremy Evans shows off the benchmark-winning optimisation techniques he uses in Sequel and Roda, a pair of incredibly fast Ruby libraries.

(Log in to track progress)

What's the Minimum Concurrency that will Benefit Rails?

This post measures Rails performance for a tiny 'hello, world' Rails app with different numbers of threads and processes. By doing so, it shows you how many threads and processes might benefit a minimal Rails app. Most apps, especially large Rails apps will want more, but this gives a working minimum.

(Log in to track progress)

Ruby Speed 2.0 Through 2.6

See how Rails speed has changed between 2.0 and 2.6. This also helps you see what kind of performance improvements might be reasonable or unreasonable to expect in the future.

(Log in to track progress)

Ruby's Global Method Cache

Ruby needs to figure out what method to call at each call site. Here's an explanation of how it does that.

(Log in to track progress)

Ruby Method Lookup and Global State

Ruby method lookup can be hard. There's some subtlety to it, some ways to debug it and some performance implications. Want to know what they are?

(Log in to track progress)

How MJIT Generates C from Ruby: A Deep Dive

Now that you understand Ruby's approach to JIT, let's dive in deep and see what that code actually looks like.

(Log in to track progress)

Benchmark Results: Threads, Processes and Fibers

Ruby has many concurrency primitives, including threads, processes and fibers. Which are faster in various circumstances? How many of each should you use? It's a complicated topic, but some benchmarks may help you learn some details. You can also find a link to the previous article explaining the details of how the benchmark is written if you like.

(Log in to track progress)

Looking for similar topics?

Comments

comments powered by Disqus