Use Nokogiri's XPath selectors for fastest speed - CSS-based search is faster than Hpricot but not as fast. Also take note that this benchmark is only shows parsing of XML (not HTML). This benchmark takes the original and uses better-benchmark instead.