Methodology

The benchmarks were performed on a Linux box, Athlon 750, 128 Mb RAM. The results are given in seconds. They were measured with the Unix time command. The user time is reported unless otherwise specified.

These are old preliminary benchmarks, and results should be taken with much care. You can find more recent benchmarks at the end of this paper.

CDuce vs. XSLT

We performed benchmarks between CDuce and a fast XSLT processor (the xsltproc program from Gnome libxslt library).

The example is intended to evaluate run-time efficiency. Even though the transformation is quite complex, type-checking time for CDuce is negligible. A few remarks:

  • type-based optimization brings almost no gain (only tag checks can be avoided);
  • the CDuce program must validate its input document (the XSLT stylesheet can operate on any document);
  • the XSLT processor is written in C; the CDuce interpreter is written in Objective Caml.

Taking these remarks into account, the results below are more than encouraging.

CDuce source - XSLT source - XSLT source (another version) - OCaml file (to generate random documents).

splitXSLT (1)XSLT (2)CDuce
5 Mb8.908.055.30
27 Mb47.1068.4033.85

The table above displays CPU user time (parsing + transformation) . The table below, instead, displays total wall-clock time (including system time). The results indicate that CDuce behave much better when the XML document does'nt fit in memory (and swapping occurs).

splitXSLT (1)XSLT (2)CDuce
5 Mb9.058.265.40
27 Mb320.80324.5083.65

CDuce vs. XDuce

Addrbook

This example was taken from XDuce distribution. The transformation is simple; the example is intended to evaluate run-time efficiency.

CDuce source - XDuce source - OCaml file (to generate random documents).

AddrbookXDuce 0.2.4XDuce 0.2.4 + patoptXDuce 0.4.0 + patoptCDuce
Type-checking0.040.050.150.04
Small file (60 Ko)1.560.149.60.09
Medium file (600 Ko)2601.16*0.46
Large file (6 Mb)*31.05*6.37

The * corresponds to checks stopped after ten minutes.

Html2latex

This example was taken from XDuce distribution and simplified (removed support for tables). The transformation is more complex; the example is intended to evaluate type-checking time.

CDuce source - CDuce source (XHTML Transitional DTD) - XDuce source - Sample input XML file.

Html2latexXDuce 0.2.4XDuce 0.2.4 + patoptXDuce 0.4.0 + patoptCDuce
Type-checking1.521.49.50.4
Total2.326.510.00.8

CDuce vs. XQuery

A benchmark test with the XQuery Use Cases is in preparation

This page briefly presents preliminary benchmarks on the CDuce prototype.

See also: