Benchmark update
In the previous benchmark I compared REXML to libxml2. In order to get a deeper understanding of where the time was being spent in REXML, I also compared REXML Document.new against Marshal.load of the same data. The result was that 2/3 of the time was spent in the parsing.
Now to explore the datastructure that REXML uses. In order to do this, I convert all of the data into a series of nested arrays of strings. Marshal the results, and then compare the times it takes to reconstruct the Nodes.
test7 | REXML Element.new Ruby 1.8 | 12.877s |
test7 | REXML Marshal::load Ruby 1.8 | 1.736s |