Chapter 3. A Practical Look at Performance

This chapter covers both the analysis and the optimization of script performance. We will warm up with some scenarios in which a good script can outpace a traditional pipeline of C applications. With this musing undertaken, we will proceed to tour the available analysis tools and apply them to a sample script. Finally, we will look at some algorithmic and linguistic optimization strategies.

It may come as a surprise to many that I would choose to talk about performance issues so early in the book. Scripting languages have a reputation for being slower than "real" languages like C. The problem with such thinking is that it is far too simplistic. I hope to demonstrate that, in the right circumstances and ...

Get Practical Ruby for System Administration 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.