---
title: "A Q and A with Noah Gibbs, Ruby benchmarker extraordinaire"
publication: "Ruby Weekly"
issue: 460
published_at: "2019-07-25"
canonical_url: "https://rubyweekly.com/issues/460"
---

This week's Ruby news.       

#460 — July 25, 2019 

[Read on the Web](https://rubyweekly.com/issues/460)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/btkqkngacezbweljsq7x.jpg)](https://github.com/piotrmurach/tty-logger)   

[TTY::Logger: Structured, Attractive Logging on the Terminal](https://github.com/piotrmurach/tty-logger) — Nice looking, colorized and formatted logging. 

Piotr Murach   

[Where Does Rails Spend Its Time?](http://engineering.appfolio.com/appfolio-engineering/2019/6/4/where-does-rails-spend-its-time) — Noah (who is the subject of our first _Ruby Weekly_ interview - more on that below) profiles Rails Ruby Bench to see where his benchmark is spending most of its time. Unsurprisingly, it involves setting up all those ActiveRecord objects we use. 

Noah Gibbs   [![\](https://copm.s3.amazonaws.com/3977034f.png)](https://honeybadger.leadpages.co/exceptions/) 

[An In-Depth Look at Ruby's Exception System](https://honeybadger.leadpages.co/exceptions/) — 😲 Ruby's exception system is more powerful than many people realize. This book shows you how to get the most from it. 

Honeybadger sponsor   

[Ruby on Whales: Dockerizing Ruby and Rails Development](https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development) — There a boatload (Ha!) of articles on ‘dockerizing’ Rails apps, but this one is _very good_ and results in a nice setup. 

Vladimir Dementyev   

[Awesome Ruby: A Curated List of Ruby Libraries and Tools](https://awesome-ruby.com/) — Each year or so, we like to link to this epic, categorized collection of Ruby goodies. It continues to be updated several times a month with new entries added and obsolete entries removed. 

Marc Anguera Insa      

👋 Be sure to scroll down to the end of this issue to enjoy an interview with Noah Gibbs, a prolific benchmarker of Ruby and Rails, on how he benchmarks Ruby and where he thinks the performance of Ruby 3.x will end up.   

💻 Jobs  

[Fight Poverty by Doing What You Love](https://www.lendahand.com/en-EU/vacancies) — We are a Rotterdam based, fast growing crowdfunding platform. Our site is built on a modern stack by a small passionate team. 

Lendahand   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-rubyweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77583) — Vettery matches top tech talent with growing companies. Create a profile to get started. 

Vettery  

📘 Articles & Tutorials  

[Reading Ruby Metaprogramming Inside Devise](https://www.saturnflyer.com/blog/reading-ruby-metaprogramming-inside-devise) — Walking through how `devise_for` adds routes and helpers to your Rails app using that technique you either love or hate: metaprogramming. 

Jim Gay   

[Leaky Constants](https://fili.pp.ru/leaky-constants.html) — A small thing, but did you know if you declare a constant in a block body it becomes a top-level constant? 

Filipp Pirozhkov   

[Learn How to Build Chat with Ruby on Rails and Dialogflow](https://dev.to/mirceacosbuc/tutorial-dialogflow-chatbot-with-ruby-on-rails-3p87) — Learn the inner workings of Stream Chat paired with Ruby on Rails and Dialogflow with this in-depth technical tutorial. 

Stream sponsor   

▶[Building Chatbots in Ruby with Daniel Pritchett](https://devchat.tv/ruby-rogues/rr-422-build-chatbot-interactions-in-ruby-with-daniel-pritchett/) 

Ruby Rogues podcast   

[Demystifying RSpec's DSL with Parentheses?](https://www.codewithjason.com/mystified-rspecs-dsl-parentheses-can-add-clarity/) — Just a simple way to wrap your head around RSpec’s often magical seeming API. _(I often do this with complex boolean logic as well, just to clarify what’s happening.)_ 

Jason Swett   

[Spinning Up a 'Rails API'-Powered JSON API in Minutes](https://blog.codeship.com/ror-developer-series-spinning-up-a-json-api-in-minutes/) — A very entry level tutorial, but useful if you haven’t played with Rails’ API-only functionality yet. 

Evan Glazer   

[How to Run Parallel Tests in RSpec on GitLab CI Pipeline](https://itnext.io/how-to-run-parallel-tests-in-rspec-on-gitlab-ci-pipeline-and-speed-up-ruby-javascript-testing-6fca26817693) 

Artur Trzop   

[Free eBook: How to Get a 3x Performance Improvement on Your Postgres Database](https://pganalyze.com/ebooks/optimizing-postgres-query-performance?utm_source=RubyWeeklySecondary) 

pganalyze sponsor   

[Fetching Millions of Rows from PostgreSQL in Rails](https://blog.magrathealabs.com/fetching-millions-of-rows-from-postgresql-with-rails-70c0cec1b6f5) — If you want to do it _quickly_, you’ll need to lean on `raw_connection` and send your own query and _stream_ the results from the database. 

Gustavo Diel  

🛠 Code and Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/u7nrbgrolre8iehttp7v.jpg)](https://github.com/piotrmurach/tty-box)   

[TTY::Box: Draw Frames and Boxes in Your Terminal Window](https://github.com/piotrmurach/tty-box) — Staying on a TTY/terminal theme, we’re getting some serious DOS-era UI vibes from this :-) 

Piotr Murach   

[QueryTrack: Find Time-Consuming ActiveRecord Database Queries](https://github.com/kirillshevch/query_track) — Can be used with Slack to provide automated notifications with backtraces, raw SQL, time duration, etc. 

Kirill Shevchenko   

[Audited: An Extension That Logs All Changes to Rails Models](https://github.com/collectiveidea/audited) — Formerly known as `acts_as_audited`. 

Collective Idea   

[Valvat: Validates European VAT Numbers](https://github.com/yolk/valvat) — If you’re working on a billing system that involves issuing invoices to European companies, this sort of library is invaluable (we use it ourselves!) 

Sebastian Munz       ![Noah Gibbs](https://res.cloudinary.com/cpress/image/upload/v1563808291/axeljjxkg7ekfujtidom.jpg) 

💬 A Q&A with…
Noah Gibbs
author of _Rebuilding Rails_ and Ruby performance benchmarker extrordinaire  

Noah is a Ruby Fellow at [AppFolio](https://engineering.appfolio.com) and has authored countless articles and given many presentations on benchmarking Ruby and Rails. He has also built benchmarking tools, including [an official benchmark for Ruby 3x3](https://github.com/noahgibbs/rails_ruby_bench). We're grateful that he's taken the time to answer a few questions today. 

What first inspired you to start benchmarking Ruby so fervently? 

When I was chosen for the Ruby Fellow role, I knew I needed to work on performance. That's what they were specifically looking for! I tried a few things including different Ruby compile options, different kinds of profiling... You can see some of that in my early articles. But what worked (for me, for readers, for the Core team) turned out to be the benchmarking. Sometimes you try a few things and find a sweet spot! 

What do you see as the largest impact item in Ruby 3x3 when it comes to better performance? 

It's hard to narrow Ruby 3x3 performance down - there are so many little fixes! But for non-Rails code, [MJIT](https://blog.bigbinary.com/2019/03/05/mjit-support-in-ruby-2-6.html) is huge. For Rails, probably a change to how Ruby handles TraceFunc in Ruby 2.5 that added nearly 10% to the overall speed. 

What's the most challenging aspect of your benchmarks? 

The most challenging aspect, always, is being sure enough (but never 100%!) that I'm right. Measuring and interpretation are hard, and often I can't be sure what a result means. Re-running tests and extra measurements help, but you're never utterly sure. You've probably noticed that a lot of my conclusions sound nuanced ("X is probably true," "Y seems very unlikely.") That's why! 

What's the most worrisome item on the current Ruby roadmap, in your opinion? 

I'm not sure I'd call any item on the roadmap "worrisome" - progress is pretty good and we have 18 months left. Static type tools took longer to get really started, but new tools like [Sorbet](https://sorbet.org/) are in surprisingly good shape. We'll get there. **I think real-world Rails performance is going to finish at more like double speed than triple.** _[editor: emphasis is ours]_ It's at about 172% speed in Ruby 2.6. That should make sense - a lot of Rails time is in the database, or libev or other C extensions and Ruby's speed doesn't affect it. In those cases I'm pretty happy with "only" doubling the end-to-end speed. Especially in a mature 20+-year-old language!   

Noah is a Ruby Fellow for [AppFolio](https://engineering.appfolio.com).          

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
