Hot tip from Jeremy Kemper on Ruby-Talk:
The recently-posted ruby-prof extension by Shugo Maeda is absolutely wonderful. Such a simple idea; why did it take so long? It times and counts method calls with very low overhead using clock, gettimeofday, or the CPU timer (on Pentium or PowerPC only). Unfortunely, it requires Ruby 1.8 newer than 2005-03-22, which means CVS, or Ruby 1.9 newer than 2005-03-17.
I started using this yesterday to benchmark Syck and it’s thirty bicycles faster than -rprofile. With the same familiar output.
ruby -runprof tests/basic.rb
Only at version 0.1, but I demand that you not fret.