From e6d2ba4e0efd208ab456bba7221f11e508151af8 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 12 Apr 2015 20:25:21 +0200 Subject: [PATCH] Warm up caches in the XPath big XML benchmark --- benchmark/xpath/evaluator/big_xml_average_bench.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/benchmark/xpath/evaluator/big_xml_average_bench.rb b/benchmark/xpath/evaluator/big_xml_average_bench.rb index eab4203..6704900 100644 --- a/benchmark/xpath/evaluator/big_xml_average_bench.rb +++ b/benchmark/xpath/evaluator/big_xml_average_bench.rb @@ -2,6 +2,9 @@ require_relative '../../benchmark_helper' doc = Oga.parse_xml(big_xml_file) +# Warm up any caches +doc.xpath('descendant-or-self::location') + measure_average do doc.xpath('descendant-or-self::location') end