/[svn]/web/bench.xml
ViewVC logotype

Contents of /web/bench.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 381 - (show annotations)
Tue Jul 10 17:30:23 2007 UTC (5 years, 10 months ago) by abate
File MIME type: text/xml
File size: 4646 byte(s)
[r2003-05-21 18:22:47 by cvscast] Start manual

Original author: cvscast
Date: 2003-05-21 18:22:50+00:00
1 <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
2 <page name="bench">
3
4 <title>Benchmarks</title>
5
6 <left>
7 <p>This page briefly presents preliminary benchmarks on the CDuce
8 prototype.
9 </p>
10 <boxes-toc/>
11 <p>See also:</p>
12 <local-links href="index,proto"/>
13 </left>
14
15 <box title="Methodology" link="meth">
16 <p>
17 The benchmarks were performed on a Linux box, Athlon 750, 128 Mb RAM.
18 The results are given in seconds. They were measured with
19 the Unix <tt>time</tt> command. The user time is reported unless
20 otherwise specified.
21 </p>
22
23 <p>
24 These are only <b>preliminary benchmarks</b>, and results
25 should be taken with much care.
26 </p>
27 </box>
28
29 <box title="CDuce vs. XDuce" link="xduce">
30
31 <section title="Addrbook">
32
33 <p>
34 This example was taken from XDuce distribution.
35 The transformation is simple;
36 the example is intended to evaluate run-time efficiency.
37 </p>
38
39 <p>
40 <a href="benchmarks/addrbook.cd">CDuce source</a> -
41 <a href="benchmarks/addrbook.q">XDuce source</a> -
42 <a href="benchmarks/addrbook.ml">OCaml file</a> (to generate random documents).
43 </p>
44
45
46 <table border="1">
47 <tr> <td>Addrbook</td>
48 <th>XDuce 0.2.4</th>
49 <th>XDuce 0.2.4 + patopt</th>
50 <th>XDuce 0.4.0 + patopt</th>
51 <th>CDuce</th> </tr>
52
53 <tr align="right"> <th>Type-checking</th>
54 <td>0.04</td> <td>0.05</td> <td>0.15</td> <td>0.04</td> </tr>
55 <tr align="right"> <th>Small file (60 Ko)</th>
56 <td>1.56</td> <td>0.14</td> <td>9.6</td> <td>0.09</td> </tr>
57 <tr align="right"> <th>Medium file (600 Ko)</th>
58 <td>260</td> <td>1.16</td> <td>*</td> <td>0.46</td> </tr>
59 <tr align ="right"> <th>Large file (6 Mb)</th>
60 <td>*</td> <td>31.05</td> <td>*</td> <td>6.37</td> </tr>
61
62 </table>
63
64 <p>
65 The * corresponds to checks stopped after ten minutes.
66 </p>
67 </section>
68
69 <section title="Html2latex">
70
71 <p>
72 This example was taken from XDuce distribution and simplified
73 (removed support for tables). The transformation is more complex;
74 the example is intended to evaluate type-checking time.
75 </p>
76
77 <p>
78 <a href="benchmarks/html2latex.cd">CDuce source</a> -
79 <a href="benchmarks/xhtml-trans.cd">CDuce source (XHTML Transitional DTD)</a> -
80 <a href="benchmarks/html2latex.q">XDuce source</a> -
81 <a href="benchmarks/tst_html2latex.xml">Sample input XML file</a>.
82 </p>
83
84 <table border="1">
85 <tr> <td>Html2latex</td>
86 <th>XDuce 0.2.4</th>
87 <th>XDuce 0.2.4 + patopt</th>
88 <th>XDuce 0.4.0 + patopt</th>
89 <th>CDuce</th> </tr>
90
91 <tr align="right"> <th>Type-checking</th>
92 <td>1.5</td> <td>21.4</td> <td>9.5</td> <td>0.4</td> </tr>
93 <tr align="right"> <th>Total</th>
94 <td>2.3</td> <td>26.5</td> <td>10.0</td> <td>0.8</td> </tr>
95 </table>
96
97 </section>
98
99 </box>
100
101 <box title="CDuce vs. XSLT" link="xslt">
102
103 <p>
104 We also performed benchmarks between CDuce and a fast XSLT processor (the
105 <tt>xsltproc</tt> program from <a href="http://xmlsoft.org/XSLT/">
106 Gnome libxslt library</a>).
107 </p>
108
109 <p>
110 The example is intended to evaluate run-time efficiency. Even though
111 the transformation is quite complex, type-checking time for CDuce
112 is negligible. A few remarks:
113 </p>
114 <ul>
115 <li>type-based optimization
116 brings almost no gain (only tag checks can be avoided);</li>
117 <li>the CDuce program must validate its input document (the XSLT
118 stylesheet can operate on any document);</li>
119 <li>the XSLT processor is written in C; the CDuce interpreter
120 is written in Objective Caml.</li>
121 </ul>
122
123 <p>
124 Taking these remarks into account, the results below are more than
125 encouraging.
126 </p>
127
128 <p>
129 <a href="benchmarks/split.cd">CDuce source</a> -
130 <a href="benchmarks/split.xslt1.xml">XSLT source</a> -
131 <a href="benchmarks/split.xslt2.xml">XSLT source (another version)</a> -
132 <a href="benchmarks/split.ml">OCaml file</a> (to generate random documents).
133 </p>
134
135
136 <table border="1">
137 <tr> <td>split</td>
138 <th>XSLT (1)</th>
139 <th>XSLT (2)</th>
140 <th>CDuce</th> </tr>
141
142 <tr align="right"> <th>5 Mb</th>
143 <td>8.90</td> <td>8.05</td> <td>5.30</td> </tr>
144 <tr align="right"> <th>27 Mb</th>
145 <td>47.10</td> <td>68.40</td> <td>33.85</td> </tr>
146 </table>
147
148 <p>
149 The table above displays CPU user time (parsing + transformation) .
150 The table below, instead, displays total wall-clock time
151 (including system time). The results indicate that CDuce
152 behave much better when the XML document
153 does'nt fit in memory (and swapping occurs).
154 </p>
155
156 <table border="1">
157 <tr> <td>split</td>
158 <th>XSLT (1)</th>
159 <th>XSLT (2)</th>
160 <th>CDuce</th> </tr>
161
162 <tr align="right"> <th>5 Mb</th>
163 <td>9.05</td> <td>8.26</td> <td>5.40</td> </tr>
164 <tr align="right"> <th>27 Mb</th>
165 <td>320.80</td> <td>324.50</td> <td>83.65</td> </tr>
166 </table>
167
168 </box>
169
170 </page>

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5