8. Memory Management and Performance

There’s an old elevator pitch which proclaims that Ruby improves programmer happiness and therefore makes programmers more productive. Or you may have heard it this way: “Ruby is optimized for programmer performance.” Either way, I think there’s some truth in those statements. In that light, you can consider this book to be a guide for improving your happiness with Ruby. That is, excluding this chapter.

You can write code all day long with a smile on your face but eventually your application is going to have to execute in the real world. Once that happens you’re going to hobble along until you realize that parts of your application will need to run faster or with less memory. In Ruby, these two things are ...

Get Effective Ruby: 48 Specific Ways to Write Better Ruby now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.