Actually the benchmarking doesn't really take place in Rails for now. You should isolate snippets of code and benchmark the time it takes to run (with the original code and the improved one).

You can just create a Ruby file with simple classes and benchmark the execution of a specific area with the `Benchmark` module as @egilburg has pointed. In the `Benchmark` module's documentation, there is an example comparing `for`, `times` and `upto` for instance.