Latest News and Blog Posts
Most Popular Blog Posts
Here's What Readers Say About the Book
This book is a must-have for anyone bringing performance-sensitive Ruby programs to production. It will teach you how to efficiently hunt down and correct the bottlenecks that make users sad and prevent teams from spending time building new functionality. Matt Margolis, Director of application development, Getty Images
A fantastic book. Probably the best tech book I have read in the last few years. It brings together information I can’t just find in 30 minutes of web searches. This book has taught me to be a better developer and to start filling a hole in my skill set. Charley Stran, Web developer, TheBlaze | Mercury Radio Arts
Ruby Performance Optimization has changed the way I develop. I now think about simple performance tweaks before I commit code. It is a book I keep close for reference when solving tough performance issues. Jeff Holland, Senior software engineer, Ackmann & Dickenson
For programmers who aren’t familiar with what is going on "under the covers," I think this book will open their eyes to new levels of understanding their code. Kim Shrier, Principal, Westryn Internet Services, Shrier and Deihl
About the Ruby Performance Optimization Book
From this book you will learn to:
- write Ruby and Rails code that is fast from the start;
- spot slow code at first glance in both plain Ruby and Rails;
- optimize what's really important (read, memory consumption);
- measure performance in a way that doesn't mislead you into optimizing the wrong thing;
- use profiling tools to optimize the complex cases;
- write performance tests to make sure performance does not degrade with the next commit.
Ruby Performance Optimization is the first book on Ruby performance that actually teaches performance optimization and is not a mere collection of tips and tricks.
No need to dig through the various blog posts, screencasts, and conference presentation recordings anymore! Everything that's important is in the book. It does not describe any of the microoptimizations (like inlining to get rid of the function call), and features only one chapter on performance tips and tricks. Other chapters concentrate on what's really important for performance: reducing high memory utilization, profiling CPU and memory, reducing the garbage collector's load.
Frequently Asked Questions
Shall I Read This Book If I Only Do Rails?
Definitely! I learned Ruby performance optimization myself by trying to speed up Rails applications. So you can expect that all advice I have actually applies to Rails. More, Chapter 3 of the book specifically focuses on making Rails faster.
Is Your Book Still Relevant for Ruby 2.3?
Of course. I wrote this book when Ruby 2.2 was the current version. Ruby 2.3 is a bit faster overall and has an improved iterator implementation (my advice from Section 2.2 does not apply anymore). But it's still largerly the same Ruby as 2.2 and 2.1. So you can expect 99% of the material of the book to be applicable to Ruby 2.3.