REXML Comparisons

Timing Comparison

This page contains information comparing REXML to other XML parsing technologies. Included are timing comparisons. Each benchmark was run for 5 seconds, which probably isn't enough to flatten out startup bumps and so on, but EXML in particular barfed at a 10 second benchmark when it ran out of memory.

The numbers under the column headers are the versions of the library being used. The version under the EXML column is the version of Java that the test was run under; I'm not aware of a way to get the EXML library version. The version of Ruby is ruby 1.6.8 (2003-02-22) [i686-linux] .

The test for hand-parsing and XPath are looking for the same elements in a large document (tutorial.xml). Therefore, if the XPath value is half of the hand-parsing value, then on average, XPath is half as fast (but much easier!) as hand parsing.

These values are in calls-per-second; higher is better. The numbers in parenthesis are multiples of the REXML score; more than one is faster than REXML, less than one is slower. N/A means 'Not Applicable', meaning the parser doesn't support that function. The scores are color coded; Java scores are not included in this, since it wouldn't be meaningful. In these tests, Java is (nearly) always faster than Ruby. The color coding is as follows:

slowestmiddlefastestnot available
functionREXML
@ANT_VERSION@
NQXML
N/A
XMLParserEXML (no JIT)
1.4.1_02
EXML (JIT)
1.4.1_02
Parsing small document529.6
Adding new elemnt19921.2
Document creation5662.2
Writing tree8.8
By-hand search8326.0
XPath search19.6
Parse large document14.2
Stream parsing14.2
Pull parsing11.4
SAX2 parsing11.4