-
-
Save mattetti/1595740 to your computer and use it in GitHub Desktop.
Revisions
-
mattetti revised this gist
Jan 11, 2012 . 2 changed files with 19 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,19 @@ $ jruby -v xmlbench.rb jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] /Users/mattetti/.rvm/gems/jruby-1.6.5/gems/nokogiri-1.5.0-java/lib/nokogiri/css.rb:3 warning: global variable `$-w' not initialized 3.455000 0.000000 3.455000 ( 3.455000) 2.074000 0.000000 2.074000 ( 2.074000) 1.601000 0.000000 1.601000 ( 1.601000) 1.614000 0.000000 1.614000 ( 1.614000) 1.602000 0.000000 1.602000 ( 1.602000) $ ruby -v xmlbench.rb ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0] malloc_limit=500000000 (8000000) heap_min_slots=4000000 (10000) 0.340000 0.020000 0.360000 ( 0.361973) 0.300000 0.020000 0.320000 ( 0.317152) 0.310000 0.010000 0.320000 ( 0.320253) 0.310000 0.010000 0.320000 ( 0.318247) 0.300000 0.010000 0.310000 ( 0.315626) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ require 'nokogiri' require 'benchmark' f = File.open("xmlbench.xml") (ARGV[0] || 5).to_i.times do puts Benchmark.measure { 10000.times { Nokogiri::XML(f) }} end -
headius revised this gist
Jan 10, 2012 . No changes.There are no files selected for viewing
-
headius revised this gist
Jan 10, 2012 . 4 changed files with 6668 additions and 41 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,41 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ system ~/projects/nokogiri $ pickjdk 1 New JDK: 1.6.0.jdk system ~/projects/nokogiri $ jruby -v xmlbench.rb jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-10 bd4cc62) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] 11.331000 0.000000 11.331000 ( 11.331000) 10.239000 0.000000 10.239000 ( 10.239000) 10.185000 0.000000 10.185000 ( 10.185000) 10.113000 0.000000 10.113000 ( 10.113000) 10.120000 0.000000 10.120000 ( 10.120000) system ~/projects/nokogiri $ pickjdk 6 New JDK: 1.7.0u.jdk system ~/projects/nokogiri $ jruby -v xmlbench.rb jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-10 bd4cc62) (OpenJDK 64-Bit Server VM 1.7.0-u2-b21) [darwin-amd64-java] 9.867000 0.000000 9.867000 ( 9.867000) 8.524000 0.000000 8.524000 ( 8.524000) 8.311000 0.000000 8.311000 ( 8.311000) 8.395000 0.000000 8.395000 ( 8.395000) 8.323000 0.000000 8.323000 ( 8.323000) system ~/projects/nokogiri $ rvm 1.9.3 do ruby xmlbench.rb 11.890000 0.940000 12.830000 ( 12.833767) 11.910000 0.940000 12.850000 ( 12.852576) 11.980000 0.940000 12.920000 ( 12.923706) 11.820000 0.930000 12.750000 ( 12.738624) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ require 'rubygems' require 'nokogiri' require 'benchmark' (ARGV[0] || 5).to_i.times do puts Benchmark.measure { 1000.times { File.open("xmlbench.xml") {|f| Nokogiri::XML(f) }}} end -
headius created this gist
Jan 10, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ system ~/projects/nokogiri $ rvm 1.9.3 do ruby xmlbench.rb 11.300000 0.570000 11.870000 ( 11.873153) 11.370000 0.570000 11.940000 ( 11.929099) 11.410000 0.580000 11.990000 ( 11.991747) 11.440000 0.570000 12.010000 ( 12.021315) 11.430000 0.570000 12.000000 ( 12.000872) 11.430000 0.580000 12.010000 ( 12.010190) ^C/Users/headius/.rvm/gems/ruby-1.9.3-p0/gems/nokogiri-1.5.0/lib/nokogiri/xml/document.rb:41:in `initialize': Interrupt from /Users/headius/.rvm/gems/ruby-1.9.3-p0/gems/nokogiri-1.5.0/lib/nokogiri/xml/document.rb:33:in `read_memory' from /Users/headius/.rvm/gems/ruby-1.9.3-p0/gems/nokogiri-1.5.0/lib/nokogiri/xml/document.rb:33:in `parse' from /Users/headius/.rvm/gems/ruby-1.9.3-p0/gems/nokogiri-1.5.0/lib/nokogiri/xml.rb:33:in `XML' from xmlbench.rb:7:in `block (3 levels) in <main>' from xmlbench.rb:7:in `times' from xmlbench.rb:7:in `block (2 levels) in <main>' from /Users/headius/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:280:in `measure' from xmlbench.rb:7:in `block in <main>' from xmlbench.rb:6:in `times' from xmlbench.rb:6:in `<main>' system ~/projects/nokogiri $ jruby -X+C xmlbench.rb 10.137000 0.000000 10.137000 ( 10.137000) 9.207000 0.000000 9.207000 ( 9.207000) 9.205000 0.000000 9.205000 ( 9.205000) 9.157000 0.000000 9.157000 ( 9.157000) 9.190000 0.000000 9.190000 ( 9.189000) 9.160000 0.000000 9.160000 ( 9.160000) 9.135000 0.000000 9.135000 ( 9.135000) 9.163000 0.000000 9.163000 ( 9.163000) 9.099000 0.000000 9.099000 ( 9.099000) 9.183000 0.000000 9.183000 ( 9.183000) ^C system ~/projects/nokogiri $ cat xmlbench.rb require 'rubygems' require 'nokogiri' require 'benchmark' data = File.read("xmlbench.xml") 50.times do puts Benchmark.measure { 1000.times { Nokogiri::XML(data) }} end