[libxml-devel] updated XML benchmarks

Charlie Savage cfis at savagexi.com
Wed Nov 19 23:41:17 EST 2008

Hi Stephan,

> 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.

Nice.  FYI - you know your script is in the libxml-ruby source tree in 
the script directory?

On my laptop (Thinkpad T60, Core 2 duo, 2GB memory):

               user     system      total        real
rexml    21.747000   0.000000  21.747000 ( 22.145000)
hpricot   4.633000   0.000000   4.633000 (  4.761000)
libxml    0.468000   0.000000   0.468000 (  0.463000)

Its impressive also how quickly Java is.

Aaraon - I added Nokogiri to the script, but it causes a general 
protection fault.  Maybe I'm doing something wrong (just checked code 
into libxml-ruby trunk if you want to look)?

> 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20081119/14259ade/attachment.bin>

More information about the libxml-devel mailing list