Added benchmark for descendant-or-self
This commit is contained in:
parent
7ee7f25239
commit
47e4a3aa49
|
@ -0,0 +1,13 @@
|
|||
require_relative '../../benchmark_helper'
|
||||
|
||||
document = Oga.parse_html(read_html)
|
||||
|
||||
Benchmark.ips do |bench|
|
||||
bench.report 'short form' do
|
||||
document.xpath('//meta')
|
||||
end
|
||||
|
||||
bench.report 'long form' do
|
||||
document.xpath('descendant-or-self::meta')
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue