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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.