FastXML


FastXML is a prototype of high performance XML components that aims to be compatible with the Microsoft® XML Parser (MSXML). It is a result of my master thesis on Faculty of Mathematics and Physics, Charles University.

How fast it is

The FastXML's  XSLT processor is about 5x faster than the latest version of MSXML according to the DataPower's XSLT Mark benchmark, and even more faster that other processors. The detailed XSLTMark results can be viewed here.

The following chart compares the average throughput of FastXML with other XSLT processors according to the XSLTMark 2.0 results. The chart is copied from there and extended with the FastXML bar, whose value has been interpolated based on the comparison with MSXML (the chart for other implementations might be slightly inaccurate because of the interpolated values were obtained on a different CPU).

The FastXML's loading of a XML document via DOM is about 6x faster and consumes 2x less memory than MSXML according to benchmarks introduced in Inside MSXML Performance. By the way, this article was an initial motivation for all this work. The detailed comparison of FastXML and MSXML can be viewed here.

How to install

  1. Download FastXML.zip
  2. Extract it into your favorite folder
  3. Run "regsvr32 FastXML.dll" to register FastXML components
  4. Run "cscript sample.js" to see how it works

FastXML registers following components, see sample.js for usage:

There is no explicit license to use the DLL. It is provided as it is with no warranty and no usage restrictions. Note that this work is just prototype, so you are likely to run into many bugs.

The FastXML driver for XSLTMark is included too. It is exactly same as MSXML driver, except the CLSIDs.

What is implemented

XML, DOM

XPath, XSLT

What is not implemented

XML, DOM

XPath, XSLT

Why it is so fast

No black magic, just careful design and heavy use of known code tuning techniques, optimizations for typical case, smart memory usage, etc.

It is written in C++ with a small help of the assembly language in one place. The total size of the assembly language code does not exceed a hundred lines, and it does not significantly impacts the overall performance.

Although there are missing features that can slow FastXML down if implemented, there are also some missing optimizations that can speed it up if implemented, e.g. Just-In-Time compilation for XSLT. I do believe there will be an fully conformant XSLT processor at least twice as fast as the current FastXML eventually.


Helena Kupková, fastxml@yahoo.com. This page was hit Counter times.