Skip to content

Instantly share code, notes, and snippets.

@brianknapp
Created October 10, 2014 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianknapp/cafdb0320e4c2cba6970 to your computer and use it in GitHub Desktop.
Save brianknapp/cafdb0320e4c2cba6970 to your computer and use it in GitHub Desktop.
Ruby Benchmarks, The Final Frontier

#Ruby Benchmarks, The Final Frontier

This is a pitch for a talk I was planning on giving at RubyConf, maybe I'll give it somewhere else

Abstract

Lets go on a journey across space and time to build the fastest possible Ruby applications. Explore the vast universe of Ruby Gems to find what frameworks, databases, algorithms, and runtimes can make high performance Ruby a reality.

Details

In this talk we will explore the various areas where Ruby is slow, fast, or maybe just fast enough for most applications. I will demonstrate what to benchmark, how to benchmark, and show real benchmarks that make clear how significant various choices in system architecture, runtime, or framework can impact application performance. I will also show how simply investing in better hardware impacts system performance and the tradeoff between programmer time and compute time.

The structure of my presentation will be to show what happens when you start with a slow program, you identify some common areas that you can make it faster, and then the difference that we can see in terms of speed by implementing various performance improving methods like picking a better algorithm, using better queries, adding caching where appropriate, etc.

The program itself will probably be some kind of web API application (not necessarily Rails) with a fairly complex and slow data model that has to do a lot of computational reporting. It will be slow enough that maybe it takes 10 seconds or more per request. By the end of the presentation, the program will morph to taking less than 1 second per request.

By demonstrating the steps to improve program performance with a real program, I hope to show how with a reasonable amount of effort, Ruby developers can deliver much faster applications without a significant increase in development time.

Pitch

I believe benchmarks and testing lead to faster, better programs. My goal is to get other Ruby developers to care about performance and to benchmark their code more often so they build better, faster applications.

I should be giving this talk because I'm far more performance obsessed than the average Rubyist. I have spent many hours benchmarking gems, optimizing database queries, implementing caching schemes at multiple system layers, and running benchmarks on all kinds of frameworks, web servers, and ruby runtimes.

I am well aware of the tradeoffs that must be made to achieve high performance systems in the real world and where most projects should spend their time to improve performance. I've personally helped build Ruby systems that support high transaction throughput and thousands of active users at one time.

I believe this talk is valuable because it is practical performance knowledge that a lot of Ruby developers can use every day. Many of the ideas relate directly to the web, where a lot of Ruby developers program, but a lot of the lessons about performance and benchmarking are generally applicable to all Ruby programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment