Skip to content

Instantly share code, notes, and snippets.

@headius
Created May 7, 2015 21:34
Show Gist options
  • Save headius/acdb399df6b93b62addf to your computer and use it in GitHub Desktop.
Save headius/acdb399df6b93b62addf to your computer and use it in GitHub Desktop.
[] ~/projects/oga $ jruby -Xcompile.invokedynamic=true -Xjit.threshold=0 -Ilib benchmark/xpath/evaluator/node_matches_bench.rb
Calculating -------------------------------------
name only 80.126k i/100ms
name wildcard 157.592k i/100ms
name + namespace 115.770k i/100ms
namespace wildcard 188.243k i/100ms
-------------------------------------------------
name only 3.045M (±14.7%) i/s - 14.343M
name wildcard 4.637M (± 9.7%) i/s - 23.008M
name + namespace 2.901M (± 9.6%) i/s - 14.471M
namespace wildcard 4.587M (± 8.5%) i/s - 22.777M
Comparison:
name wildcard: 4637272.6 i/s
namespace wildcard: 4586664.0 i/s - 1.01x slower
name only: 3045237.8 i/s - 1.52x slower
name + namespace: 2900736.1 i/s - 1.60x slower
[] ~/projects/oga $ vi lib/oga/xpath/evaluator.rb
[] ~/projects/oga $ jruby -Xcompile.invokedynamic=true -Xjit.threshold=0 -Ilib benchmark/xpath/evaluator/node_matches_bench.rb
Calculating -------------------------------------
name only 87.032k i/100ms
name wildcard 176.864k i/100ms
name + namespace 137.484k i/100ms
namespace wildcard 205.633k i/100ms
-------------------------------------------------
name only 3.510M (±13.8%) i/s - 16.536M
name wildcard 5.254M (± 9.8%) i/s - 25.999M
name + namespace 3.098M (± 9.2%) i/s - 15.398M
namespace wildcard 4.611M (± 9.6%) i/s - 22.825M
Comparison:
name wildcard: 5254166.9 i/s
namespace wildcard: 4610987.7 i/s - 1.14x slower
name only: 3510286.7 i/s - 1.50x slower
name + namespace: 3098034.3 i/s - 1.70x slower
[] ~/projects/oga $ rvm ruby-2.2 do ruby -Ilib benchmark/xpath/evaluator/node_matches_bench.rb
Calculating -------------------------------------
name only 38.475k i/100ms
name wildcard 44.344k i/100ms
name + namespace 34.764k i/100ms
namespace wildcard 40.667k i/100ms
-------------------------------------------------
name only 753.301k (± 7.2%) i/s - 3.771M
name wildcard 949.054k (± 7.7%) i/s - 4.745M
name + namespace 713.359k (± 5.8%) i/s - 3.581M
namespace wildcard 969.086k (± 7.4%) i/s - 4.839M
Comparison:
namespace wildcard: 969086.1 i/s
name wildcard: 949053.7 i/s - 1.02x slower
name only: 753301.5 i/s - 1.29x slower
name + namespace: 713359.1 i/s - 1.36x slower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment