Updated XML benchmarks


#1

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

#2

Very nice, thanks for these numbers. It looks like we definitely hit a
few of the right bottlenecks in 1.1.5. Your results match others
reporting that for example Rails is running much better now too.

I’m also less reluctant now to the idea of making a REXML look-alike
that just uses Java XML parsing. It wouldn’t require us to ship with
anything new, and it kinda makes sense for us to take advantage of what
we have available.

Work continues!

Stephen B. wrote:

JRuby 1.1.5 has gotten much faster running pure Ruby code and now runs
here are from the second run. Java automatically optimizes JRuby code
JRuby (Java 1.6.0_07): jdom_document_builder 0.401


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email