I’ve updated my simple ruby xml benchmark which measures the time to
open a 98k XML document and count one type of leaf element (466
entries) 100 times.
https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
The summary is that for this one test using libxml in MRI and
jdom_document_builder (a native Java library) in JRuby take just
about the same time. This is similar to the last time I ran these
benchmarks.
JRuby 1.1.5 has gotten much faster running pure Ruby code and now
runs rexml about 30% faster than MRI. Hpricot is about 5 times slower
than libxml and jdom_document_builder and runs slightly faster in
JRuby.
Tests run on a MacBook Pro, Mac OS X 10.5.5, 4GB memory, 2.5 GHz
Intel Core 2 Duo.
hpricot 0.6.164
libxml: 0.9.2
All benchmarks were run twice in sequence and the measurements
presented here are from the second run. Java automatically optimizes
JRuby code which is run many times and the speedup from the first to
the second test is from 40 to 75%. There is no essential difference
in the speed of the C version of Ruby between the first test and the
second.
100 times: Open 98k XML document and count one type of leaf element
(466 entries)
JRuby (Java 1.6.0_03-p3-Soylatte using server mode):
jdom_document_builder 0.360
MRI: libxml v0.9.2
0.383
JRuby (Java 1.6.0_07): jdom_document_builder
0.401
JRuby (Java 1.5.0_16): jdom_document_builder
0.428
JRuby (Java 1.6.0_03-p3-Soylatte using server mode): hpricot
1.977
JRuby (Java 1.5.0_16): hpricot
2.027
JRuby (Java 1.6.0_07): hpricot
2.094
MRI: hpricot
2.140
JRuby (Java 1.6.0_03-p3-Soylatte using server mode): rexml
5.488
JRuby (Java 1.5.0_16): rexml
5.569
JRuby (Java 1.5.0_16): rexml
5.578
MRI: rexml
8.606
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email