It is also worth noting that this is actually measuring the load time for rubygems itself.

A more accurate representation of the speed of require would come from first loading rubygems explicitly.

require 'rubygems'

Profile { require 'pg' }

Even this has some issues, as the source_index is loaded for the first gem load, and then not required to be loaded each time, so a yet more accurate approach might be something like:

require 'rubygems'
require 'hoe'

Profile { require 'pg' }