Skip to content

Benchmarks: exemplar 0.3.0 ​

2026-11-21 · AMD Ryzen 9 7900 12-Core Processor, 4 cores, 8 GB, linux x64 · Node 24.13.1, V8 13.6.233.17-node.40 · commit 2ae27f9 · best of 3 rounds

At a glance · How much each library checks · Datasets · FreeBSD docs · FreeBSD docs (simplified) · PostgreSQL book · OpenStack manuals · XMark · Expat recordsets · DocBook DTD with entity sets · Synthetic, 100 K elements · Synthetic, 1 M elements

At a glance ​

Speeds are in MB of input per second, from the best of 3 rounds, over the documents each library read correctly. A library that read only part of a dataset correctly is timed on that part, so its speed and exemplar's cover different documents. ‡ marks a library that read at least half of the data, by size, but not all of it; in the charts its bars are orange from 95% and red below. FAILED marks one that read less than half, whose speed would say little about the dataset. exemplar's bars are always blue, and – marks a workload the library does not have.

In each workload, a library:

  • walk parses and visits every event, reading nothing.
  • read reads every element name, attribute and text.
  • stream reads the same from a file in 64 KB chunks.
  • small reads documents of 2–20 KB, which shows the cost per document.
  • tree builds the library's own tree.
  • xdm builds an XDM tree, the data model XPath, XQuery and XSLT run on.
  • xpath runs a set of XPath queries over each document, parsed beforehand: the XMark queries on XMark, general ones elsewhere.
  • axes times tree walks along every axis one by one, over the document parsed beforehand: XMark's names only.
  • compile compiles each of the dataset's XPath queries 200 times, every copy made unique so that no cache answers, and runs it over a one-element document; shown in expressions compiled per second.
  • write serializes events it read beforehand.
  • dtd reads a one-element document with its large DTD, counting the DTD with the document.

Reading, MB/s ​

Reading speed

Datasetexemplarhtmlparser2saxsaxensaxesstax-xml
FreeBSD docs154.9FAILEDFAILEDFAILEDFAILEDFAILED
FreeBSD docs (simplified)322.1178.754.1264.1157.2181.8 ‡
PostgreSQL book292.7136.451.4237.0129.7161.4
OpenStack manuals219.3128.8 ‡45.0 ‡209.7 ‡111.2121.2 ‡
XMark376.6154.069.4306.1147.5215.1
Expat recordsets133.977.327.878.573.2102.4
Synthetic, 100 K elements182.098.043.4118.373.0109.6
Synthetic, 1 M elements219.198.244.1129.376.2122.7

Streaming from a file, MB/s ​

Streaming speed

Datasetexemplarhtmlparser2saxsaxensaxesstax-xml
FreeBSD docs87.7FAILEDFAILEDFAILEDFAILEDFAILED
FreeBSD docs (simplified)177.5111.843.9 ‡98.4102.982.5 ‡
PostgreSQL book164.8117.350.9133.6110.388.3
OpenStack manuals108.036.3 ‡22.1 ‡34.0 ‡34.633.3 ‡
XMark256.8141.368.4209.7133.6119.9
Expat recordsets103.974.727.962.769.189.2
Synthetic, 100 K elements130.090.542.192.264.266.0
Synthetic, 1 M elements141.591.743.7101.268.881.1

Building trees, MB/s ​

Tree building speed

Datasetexemplarfast-xml-parserlibxmljs2saxon-js-2saxon-js-3txml@xmldom/xmldom
FreeBSD docs87.4FAILED85.4 ‡FAILEDFAILEDFAILEDFAILED
FreeBSD docs (simplified)168.640.0 ‡167.031.931.8FAILED22.1
PostgreSQL book134.9FAILED275.329.728.5FAILED19.4
OpenStack manuals124.9FAILED214.827.927.1FAILED21.5
XMark173.941.6351.437.337.2148.123.0
Expat recordsets86.2FAILED126.123.123.188.237.2
Synthetic, 100 K elements99.225.0182.826.225.788.616.2
Synthetic, 1 M elements99.226.5183.825.725.691.615.9

Building XDM trees, MB/s ​

XDM tree building speed

Datasetexemplarsaxon-js-2saxon-js-3
FreeBSD docs94.5FAILEDFAILED
FreeBSD docs (simplified)164.231.931.9
PostgreSQL book150.329.029.0
OpenStack manuals108.528.027.2
XMark200.237.136.2
Expat recordsets74.923.022.8
Synthetic, 100 K elements90.526.026.2
Synthetic, 1 M elements103.825.725.3

Querying with XPath, MB/s ​

XPath query speed

Datasetexemplarsaxon-js-2saxon-js-3
FreeBSD docs67.2FAILEDFAILED
FreeBSD docs (simplified)69.76.46.4
PostgreSQL book53.25.15.1
OpenStack manuals44.36.05.7
XMark233.57.47.7
Expat recordsets628.843.242.9
Synthetic, 100 K elements43.33.93.9
Synthetic, 1 M elements48.83.93.9

Compiling XPath, expressions per second ​

XPath compilation speed

Datasetexemplarsaxon-js-2saxon-js-3
OpenStack manuals1101275408152564
XMark790082779927727

Reading DTDs, MB/s ​

DTD reading speed

Datasetexemplarlibxmljs2
DocBook DTD with entity sets144.481.4

Memory the trees hold ​

MB still in use once every document's tree has been built and kept: heap, native memory V8 is told of, and native memory a library reports itself. ‡ and FAILED mean the same as for speeds: a library that failed some documents holds fewer trees.

Memory the trees hold

Datasetexemplarfast-xml-parserlibxmljs2saxon-js-2saxon-js-3txml@xmldom/xmldom
FreeBSD docs242FAILED280 ‡FAILEDFAILEDFAILEDFAILED
FreeBSD docs (simplified)449459 ‡556963963FAILED1559
PostgreSQL book67FAILED73133133FAILED224
OpenStack manuals37FAILED597474FAILED123
XMark629666730115111515382081
Expat recordsets604FAILED641490490247743
Synthetic, 100 K elements594061828233143
Synthetic, 1 M elements5913956148138133301435

Memory the XDM trees hold ​

MB still in use once every document's tree has been built and kept: heap, native memory V8 is told of, and native memory a library reports itself. ‡ and FAILED mean the same as for speeds: a library that failed some documents holds fewer trees.

Memory the XDM trees hold

Datasetexemplarsaxon-js-2saxon-js-3
FreeBSD docs90FAILEDFAILED
FreeBSD docs (simplified)200963963
PostgreSQL book31133133
OpenStack manuals167474
XMark20911511151
Expat recordsets139490490
Synthetic, 100 K elements188282
Synthetic, 1 M elements172813813

How much each library checks ​

A library that checks less of XML can be faster. From the conformance reports: "Rejects malformed" is the share of the not-well-formed test documents a library rejects, and "Correct data" the share of the expected outputs it matches.

How much each library checks

LibraryRejects malformedCorrect data
exemplar99.7%100.0%
fast-xml-parser41.0%68.5%
htmlparser212.7%53.1%
libxmljs294.5%91.0%
sax48.6%62.5%
saxen30.9%52.1%
saxes70.3%91.4%
saxon-js-247.7%89.6%
saxon-js-347.7%89.6%
stax-xml70.2%61.0%
txml14.0%49.3%
@xmldom/xmldom84.7%89.7%

Datasets ​

Preparing a dataset checks every document with the JDK's Xerces and keeps only those it accepts.

DatasetDocumentsMBLeft out in preparationVersionLicence
FreeBSD docs1,83040.7734release/12.2.0 (6525fd04), LF turned into CRLFFreeBSD Documentation License
FreeBSD docs (simplified)1,71592.638release/12.2.0 (6525fd04), entities resolved and DOCTYPE removed by xmllintFreeBSD Documentation License
PostgreSQL book112.20REL_18_0, assembled into one document by xmllintPostgreSQL Licence
OpenStack manuals9666.550juno-eol (304d14ff)Apache-2.0, CC BY 3.0 and CC BY-SA 3.0, by book
XMark1116.50xmlgen from CWI, factor 1Unclear; generated locally and never redistributed
Expat recordsets266.00libexpat b8fedbbfMIT
DocBook DTD with entity sets2046.20release/12.2.0 (6525fd04); xmlcharent 0.3FreeBSD Documentation License; xmlcharent under its OASIS notice
Synthetic, 100 K elements16.20seed 1generated
Synthetic, 1 M elements161.70seed 1generated

FreeBSD docs ​

  • The FreeBSD documentation as published at release 12.2.0, with its LF line endings turned into CRLF, so that reading normalizes them.
  • Internal subsets, eight encodings including Japanese in EUC-JP, and documents of every size.
  • Read standalone, as every dataset is: no library reads the external DocBook and FreeBSD DTDs, so references to the entities they declare, such as &os;, are not expanded.
  • Where such a reference makes a document malformed, preparation leaves the document out; where an unread part of the DTD could declare it, the reference is skipped, as the XML specification allows.

1,830 documents, 40.7 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamsmalltreexdmxpathwriteTree MBXDM MB
exemplar100%196.3154.987.795.787.494.567.2135.324290
fast-xml-parser11%––––FAILED–––FAILED–
htmlparser2<1%FAILEDFAILEDFAILEDFAILED––––––
libxmljs284%––––85.4 ‡–––280 ‡–
sax<1%FAILEDFAILEDFAILEDFAILED––––––
saxen<1%FAILEDFAILEDFAILEDFAILED––––––
saxes37%FAILEDFAILEDFAILEDFAILED––––––
saxon-js-214%––––FAILEDFAILEDFAILED–FAILEDFAILED
saxon-js-314%––––FAILEDFAILEDFAILED–FAILEDFAILED
stax-xml<1%FAILEDFAILEDFAILEDFAILED–––FAILED––
txml<1%––––FAILED–––FAILED–
@xmldom/xmldom37%––––FAILED–––FAILED–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk2082088.4%0 of 1,8300n/a129n/a
htmlparser2 12.0.0walk2432494.0%0 of 1,830877n/a151n/a
sax 1.6.1walk3843871.2%1,556 of 1,830196n/a239n/a
saxen 11.2.0walk95985.3%0 of 1,830877n/a59n/a
saxes 6.0.0walk1371374.0%1,571 of 1,8300n/a85n/a
stax-xml 1.1.2walk1211253.2%1,571 of 1,830189n/a76n/a
exemplar 0.3.0read2632693.7%0 of 1,83000163n/a
htmlparser2 12.0.0read2702732.1%0 of 1,8308771,807168n/a
sax 1.6.1read3994051.7%1,556 of 1,830196268248n/a
saxen 11.2.0read1811820.8%0 of 1,8308771,807113n/a
saxes 6.0.0read1631630.1%1,571 of 1,83000101n/a
stax-xml 1.1.2read1381380.8%1,571 of 1,83018925386n/a
exemplar 0.3.0tree4654701.1%0 of 1,8300n/a289242
fast-xml-parser 5.11.2tree7227293.6%128 of 1,830436n/a449189
libxmljs2 0.37.0tree4314341.2%512 of 1,8307n/a268280
saxon-js-2 2.7.0tree3433565.7%1,578 of 1,8300n/a21384
saxon-js-3 3.0.0-beta2tree3973971.8%1,578 of 1,8300n/a24784
txml 6.0.3tree91922.1%259 of 1,830711n/a5684
@xmldom/xmldom 0.9.12tree99710041.0%1,571 of 1,8300n/a620343
exemplar 0.3.0xdm4314342.7%0 of 1,8300n/a26890
saxon-js-2 2.7.0xdm3553551.8%1,578 of 1,8300n/a22184
saxon-js-3 3.0.0-beta2xdm3843932.8%1,578 of 1,8300n/a23984
exemplar 0.3.0xpath6056072.1%0 of 1,83000376n/a
saxon-js-2 2.7.0xpath106110691.6%1,578 of 1,83000660n/a
saxon-js-3 3.0.0-beta2xpath105210572.9%1,578 of 1,83000654n/a
exemplar 0.3.0stream4644651.8%0 of 1,83000289n/a
htmlparser2 12.0.0stream4164385.4%947 of 1,830877866259n/a
sax 1.6.1stream5955953.3%1,628 of 1,830196196370n/a
saxen 11.2.0stream4024137.4%947 of 1,830877866250n/a
saxes 6.0.0stream3533584.9%1,635 of 1,83000220n/a
stax-xml 1.1.2stream3463501.3%1,635 of 1,830189189215n/a
exemplar 0.3.0small74751.2%0 of 9910046n/a
htmlparser2 12.0.0small61614.7%0 of 99187799038n/a
sax 1.6.1small384621.4%903 of 9911968724n/a
saxen 11.2.0small404738.1%0 of 99187799025n/a
saxes 6.0.0small272712.9%905 of 9910017n/a
stax-xml 1.1.2small27272.0%905 of 9911898517n/a
exemplar 0.3.0write3013062.7%0 of 1,8300n/a187n/a
stax-xml 1.1.2write2332365.2%1,711 of 1,830189n/a145n/a

fast-xml-parser first differs in bn_BD.UTF-8/articles/new-users/article.xml: at 27353: got "&amp;nbsp; Associates, 1993,&#10; I", expected " Associates, 1993,&#10; ISBN 0-9371"

htmlparser2 first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: at 107: got "3;&#10; <info><title>BSD কি, কেন,&#13;&", expected "0; <info><title>BSD কি, কেন,&#10; "

libxmljs2 first differs in de_DE.ISO8859-1/htdocs/art.xml: rejects it

sax first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: at 107: got "3;&#10; <info><title>BSD কি, কেন,&#13;&", expected "0; <info><title>BSD কি, কেন,&#10; "

saxen first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: at 107: got "3;&#10; <info><title>BSD কি, কেন,&#13;&", expected "0; <info><title>BSD কি, কেন,&#10; "

saxes first differs in bn_BD.UTF-8/articles/new-users/article.xml: rejects it

saxon-js-2 first differs in bn_BD.UTF-8/articles/new-users/article.xml: rejects it

saxon-js-3 first differs in bn_BD.UTF-8/articles/new-users/article.xml: rejects it

stax-xml first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: at 107: got "3;&#10; <info><title>BSD কি, কেন,&#13;&", expected "0; <info><title>BSD কি, কেন,&#10; "

txml first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: rejects it

@xmldom/xmldom first differs in bn_BD.UTF-8/articles/new-users/article.xml: rejects it

FreeBSD docs (simplified) ​

  • The FreeBSD docs documents rewritten by xmllint as plain XML, so that every library can read the same content. As published, they need DTDs that most libraries cannot read, so those libraries fail on most documents.
  • xmllint first checks each document with its DTDs, read through the DocBook and FreeBSD catalogs, and replaces every entity with its text.
  • The DOCTYPE, with its internal subset, is removed.
  • Every document is re-encoded as UTF-8, the Japanese ones in EUC-JP included.
  • Each namespace is declared once, where it comes into force, rather than on every element, as the DTDs' attribute defaults would give it.
  • Line endings are LF, as reading normalizes them.
  • Left out, and counted in preparation: documents xmllint finds malformed when read with their DTDs, or that use entities no DTD declares, or that need a DTD the archive does not hold, and documents with references Xerces cannot resolve once the DOCTYPE is gone. Documents without a DOCTYPE are not rewritten: most are parts of books that other documents include.

1,715 documents, 92.6 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamsmalltreexdmxpathwriteTree MBXDM MB
exemplar100%394.4322.1177.5266.5168.6164.269.7144.9449200
fast-xml-parser76%––––40.0 ‡–––459 ‡–
htmlparser2100%191.0178.7111.8124.6––––––
libxmljs2100%––––167.0–––556–
sax100%57.154.143.9 ‡51.0––––––
saxen100%422.6264.198.4206.3––––––
saxes100%191.8157.2102.9108.1––––––
saxon-js-2100%––––31.931.96.4–963963
saxon-js-3100%––––31.831.96.4–963963
stax-xml76%221.8 ‡181.8 ‡82.5 ‡118.0 ‡–––91.7 ‡––
txml17%––––FAILED–––FAILED–
@xmldom/xmldom100%––––22.1–––1559–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk2352362.3%0 of 1,7150n/a65n/a
htmlparser2 12.0.0walk4854860.3%0 of 1,7150n/a133n/a
sax 1.6.1walk162216442.3%0 of 1,7150n/a446n/a
saxen 11.2.0walk2192253.1%0 of 1,7150n/a60n/a
saxes 6.0.0walk4834872.9%0 of 1,7150n/a133n/a
stax-xml 1.1.2walk4214253.0%0 of 1,71544n/a116n/a
exemplar 0.3.0read2882911.1%0 of 1,7150079n/a
htmlparser2 12.0.0read5195230.9%0 of 1,71500143n/a
sax 1.6.1read171417301.3%0 of 1,71500471n/a
saxen 11.2.0read3513551.6%0 of 1,7150097n/a
saxes 6.0.0read5906065.7%0 of 1,71500162n/a
stax-xml 1.1.2read5125184.1%0 of 1,7154444141n/a
exemplar 0.3.0tree5505583.0%0 of 1,7150n/a151449
fast-xml-parser 5.11.2tree224322752.3%4 of 1,71543n/a617459
libxmljs2 0.37.0tree5555560.7%0 of 1,7150n/a153556
saxon-js-2 2.7.0tree290829541.8%0 of 1,7150n/a800963
saxon-js-3 3.0.0-beta2tree291029132.3%0 of 1,7150n/a800963
txml 6.0.3tree84862.2%262 of 1,7154n/a2377
@xmldom/xmldom 0.9.12tree418441870.1%0 of 1,7150n/a11511559
exemplar 0.3.0xdm5645732.0%0 of 1,7150n/a155200
saxon-js-2 2.7.0xdm290329171.4%0 of 1,7150n/a798963
saxon-js-3 3.0.0-beta2xdm290629141.6%0 of 1,7150n/a799963
exemplar 0.3.0xpath132913302.6%0 of 1,71500365n/a
saxon-js-2 2.7.0xpath14374144091.4%0 of 1,715003953n/a
saxon-js-3 3.0.0-beta2xpath14421145722.4%0 of 1,715003966n/a
exemplar 0.3.0stream5225231.6%0 of 1,71500144n/a
htmlparser2 12.0.0stream8308476.3%0 of 1,71500228n/a
sax 1.6.1stream206420740.6%1 of 1,71500568n/a
saxen 11.2.0stream9429511.5%0 of 1,71500259n/a
saxes 6.0.0stream9019113.3%0 of 1,71500248n/a
stax-xml 1.1.2stream106210804.3%0 of 1,7154444292n/a
exemplar 0.3.0small24248.8%0 of 867007n/a
htmlparser2 12.0.0small51518.6%0 of 8670014n/a
sax 1.6.1small1241272.5%0 of 8670034n/a
saxen 11.2.0small313313.6%0 of 867008n/a
saxes 6.0.0small59590.4%0 of 8670016n/a
stax-xml 1.1.2small54564.4%0 of 867441415n/a
exemplar 0.3.0write6406533.1%0 of 1,7150n/a176n/a
stax-xml 1.1.2write105510621.3%0 of 1,71544n/a290n/a

fast-xml-parser first differs in de_DE.ISO8859-1/books/handbook/book.xml: rejects it

stax-xml first differs in de_DE.ISO8859-1/books/handbook/book.xml: at 836236: got "?>&#10;&#10; <sect1 xml:id=\"linuxemu-ad", expected "\n ?>&#10;&#10; <sect1 xml:id=\"linuxemu"

txml first differs in bn_BD.UTF-8/articles/explaining-bsd/article.xml: rejects it

PostgreSQL book ​

1 document, 12.2 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamtreexdmxpathwriteTree MBXDM MB
exemplar100%380.8292.7164.8134.9150.353.2141.46731
fast-xml-parser0%–––FAILED–––FAILED–
htmlparser2100%142.5136.4117.3––––––
libxmljs2100%–––275.3–––73–
sax100%54.751.450.9––––––
saxen100%360.0237.0133.6––––––
saxes100%159.7129.7110.3––––––
saxon-js-2100%–––29.729.05.1–133133
saxon-js-3100%–––28.529.05.1–133133
stax-xml100%196.3161.488.3–––66.6––
txml0%–––FAILED–––FAILED–
@xmldom/xmldom100%–––19.4–––224–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk32322.0%0 of 10n/a61n/a
htmlparser2 12.0.0walk85861.1%0 of 10n/a162n/a
sax 1.6.1walk22222512.8%0 of 10n/a423n/a
saxen 11.2.0walk34345.7%0 of 10n/a64n/a
saxes 6.0.0walk76760.7%0 of 10n/a145n/a
stax-xml 1.1.2walk62620.5%0 of 10n/a118n/a
exemplar 0.3.0read42433.7%0 of 10079n/a
htmlparser2 12.0.0read89900.8%0 of 100170n/a
sax 1.6.1read2362401.7%0 of 100450n/a
saxen 11.2.0read51522.9%0 of 10098n/a
saxes 6.0.0read94940.3%0 of 100178n/a
stax-xml 1.1.2read75762.2%0 of 100143n/a
exemplar 0.3.0tree90902.1%0 of 10n/a17267
fast-xml-parser 5.11.2tree550.2%1 of 10n/an/an/a
libxmljs2 0.37.0tree44453.4%0 of 10n/a8473
saxon-js-2 2.7.0tree4104357.5%0 of 10n/a780133
saxon-js-3 3.0.0-beta2tree4284331.8%0 of 10n/a813133
txml 6.0.3tree1115.2%1 of 10n/an/an/a
@xmldom/xmldom 0.9.12tree6286320.8%0 of 10n/a1195224
exemplar 0.3.0xdm81826.3%0 of 10n/a15431
saxon-js-2 2.7.0xdm4204292.9%0 of 10n/a799133
saxon-js-3 3.0.0-beta2xdm4204286.0%0 of 10n/a799133
exemplar 0.3.0xpath2292319.6%0 of 100435n/a
saxon-js-2 2.7.0xpath239624060.7%0 of 1004559n/a
saxon-js-3 3.0.0-beta2xpath240524291.5%0 of 1004576n/a
exemplar 0.3.0stream74752.5%0 of 100140n/a
htmlparser2 12.0.0stream1041064.5%0 of 100197n/a
sax 1.6.1stream2392425.4%0 of 100455n/a
saxen 11.2.0stream91968.2%0 of 100173n/a
saxes 6.0.0stream1101122.8%0 of 100210n/a
stax-xml 1.1.2stream1381382.8%0 of 100262n/a
exemplar 0.3.0write86862.7%0 of 10n/a164n/a
stax-xml 1.1.2write1831862.1%0 of 10n/a347n/a

fast-xml-parser first differs in doc/src/sgml/postgres.sgml: rejects it

txml first differs in doc/src/sgml/postgres.sgml: rejects it

OpenStack manuals ​

966 documents, 6.5 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamsmalltreexdmxpathcompilewriteTree MBXDM MB
exemplar100%283.1219.3108.0213.7124.9108.544.311012798.13716
fast-xml-parser44%––––FAILED––––FAILED–
htmlparser298%134.3 ‡128.8 ‡36.3 ‡100.1 ‡–––––––
libxmljs2100%––––214.8––––59–
sax98%47.0 ‡45.0 ‡22.1 ‡43.6 ‡–––––––
saxen97%309.0 ‡209.7 ‡34.0 ‡170.2 ‡–––––––
saxes100%134.2111.234.694.2–––––––
saxon-js-2100%––––27.928.06.054081–7474
saxon-js-3100%––––27.127.25.752564–7474
stax-xml98%148.0 ‡121.2 ‡33.3 ‡135.3 ‡––––79.8 ‡––
txml30%––––FAILED––––FAILED–
@xmldom/xmldom100%––––21.5––––123–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk23233.8%0 of 9660n/a92n/a
htmlparser2 12.0.0walk49507.0%0 of 9665n/a193n/a
sax 1.6.1walk1381383.9%0 of 9665n/a549n/a
saxen 11.2.0walk21229.1%0 of 9669n/a85n/a
saxes 6.0.0walk48490.7%0 of 9660n/a192n/a
stax-xml 1.1.2walk44452.5%0 of 9665n/a176n/a
exemplar 0.3.0read303012.1%0 of 96600118n/a
htmlparser2 12.0.0read505310.2%0 of 96650200n/a
sax 1.6.1read1441451.6%0 of 96650573n/a
saxen 11.2.0read31316.9%0 of 96694124n/a
saxes 6.0.0read58591.4%0 of 96600232n/a
stax-xml 1.1.2read545612.9%0 of 96650214n/a
exemplar 0.3.0tree52533.5%0 of 9660n/a20737
fast-xml-parser 5.11.2tree1731761.8%25 of 966176n/a68942
libxmljs2 0.37.0tree30311.0%0 of 9660n/a12159
saxon-js-2 2.7.0tree2382411.9%0 of 9660n/a94574
saxon-js-3 3.0.0-beta2tree2392422.0%0 of 9660n/a95174
txml 6.0.3tree354029.1%203 of 96696n/a13927
@xmldom/xmldom 0.9.12tree3023071.8%0 of 9660n/a1201123
exemplar 0.3.0xdm60601.5%0 of 9660n/a23816
saxon-js-2 2.7.0xdm2382391.2%0 of 9660n/a94774
saxon-js-3 3.0.0-beta2xdm2382403.5%0 of 9660n/a94874
exemplar 0.3.0xpath14715521.0%0 of 96600583n/a
saxon-js-2 2.7.0xpath108711134.4%0 of 966004324n/a
saxon-js-3 3.0.0-beta2xpath113411411.0%0 of 966004511n/a
exemplar 0.3.0compile202017.5%0 of 10n/a79n/a
saxon-js-2 2.7.0compile41414.9%0 of 10n/a162n/a
saxon-js-3 3.0.0-beta2compile42437.4%0 of 10n/a167n/a
exemplar 0.3.0stream606111.0%0 of 96600239n/a
htmlparser2 12.0.0stream1771817.1%0 of 96650705n/a
sax 1.6.1stream2922931.3%0 of 966501163n/a
saxen 11.2.0stream1882007.0%0 of 96694746n/a
saxes 6.0.0stream18820014.2%0 of 96600746n/a
stax-xml 1.1.2stream1941987.8%0 of 96650771n/a
exemplar 0.3.0small14142.0%0 of 5040057n/a
htmlparser2 12.0.0small30329.4%0 of 50450121n/a
sax 1.6.1small70714.1%0 of 50450278n/a
saxen 11.2.0small18183.9%0 of 5049272n/a
saxes 6.0.0small32335.3%0 of 50400129n/a
stax-xml 1.1.2small232314.6%0 of 5045090n/a
exemplar 0.3.0write66675.0%0 of 9660n/a263n/a
stax-xml 1.1.2write82832.4%0 of 9665n/a325n/a

fast-xml-parser first differs in doc/admin-guide-cloud/bk-admin-guide-cloud.xml: at 258: got "?>&#10; <titleabbrev>Cloud Administra", expected "title.font.size=\"28px\" subtitle.font.siz"

htmlparser2 first differs in doc/admin-guide-cloud/networking/section_networking-adv-config.xml: at 24253: got "&#10; service\">ne", expected " service\">neutro"

sax first differs in doc/admin-guide-cloud/networking/section_networking-adv-config.xml: at 24253: got "&#10; service\">ne", expected " service\">neutro"

saxen first differs in doc/admin-guide-cloud/networking/section_networking-adv-config.xml: at 24253: got "&#10; service\">ne", expected " service\">neutro"

stax-xml first differs in doc/admin-guide-cloud/networking/section_networking-adv-config.xml: at 24253: got "&#10; service\">ne", expected " service\">neutro"

txml first differs in doc/admin-guide-cloud/bk-admin-guide-cloud.xml: at 258: got "?>&#10; <titleabbrev>Cloud Administra", expected "title.font.size=\"28px\" subtitle.font.siz"

XMark ​

1 document, 116.5 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamtreexdmxpathaxescompilewriteTree MBXDM MB
exemplar100%440.0376.6256.8173.9200.2233.549.979008212.9629209
fast-xml-parser100%–––41.6–––––666–
htmlparser2100%167.9154.0141.3––––––––
libxmljs2100%–––351.4–––––730–
sax100%74.669.468.4––––––––
saxen100%487.7306.1209.7––––––––
saxes100%186.7147.5133.6––––––––
saxon-js-2100%–––37.337.17.41.427799–11511151
saxon-js-3100%–––37.236.27.71.327727–11511151
stax-xml100%252.5215.1119.9–––––69.3––
txml100%–––148.1–––––538–
@xmldom/xmldom100%–––23.0–––––2081–

Tree walks, one by one ​

Each query's best time over the rounds, in ms, and in brackets how many times exemplar's it is.

AxisQueryexemplarsaxon-js-2saxon-js-3
child/site/people/person2.017.4 (8.8×)17.3 (8.7×)
child/site/*/*/*22.6180.8 (8.0×)182.1 (8.1×)
child//person/*16.51023.3 (62.2×)1021.4 (62.0×)
descendant//bidder11.3964.4 (85.2×)988.3 (87.3×)
descendant//*79.9927.6 (11.6×)935.5 (11.7×)
descendant//text()114.5947.5 (8.3×)955.6 (8.3×)
descendant//node()276.21207.2 (4.4×)1239.6 (4.5×)
descendant/site/descendant::keyword12.71007.1 (79.4×)1012.1 (79.8×)
descendant//open_auction//bidder18.01324.7 (73.8×)1322.0 (73.6×)
descendant-or-self//item/descendant-or-self::*31.51310.2 (41.6×)1307.7 (41.5×)
position after ////bidder[1]14.31523.4 (106.9×)1557.8 (109.3×)
position after ////bidder[last()]15.41590.6 (103.4×)1574.0 (102.3×)
position after ////bidder[position() > 2]21.52003.4 (93.1×)2035.6 (94.6×)
position after ////bidder[2]12.01518.3 (126.8×)1545.6 (129.0×)
position after ////bidder[position() = last() - 1]21.52017.0 (93.8×)2098.1 (97.5×)
position after ////*[1]37.21654.4 (44.5×)1681.7 (45.3×)
position on a step//open_auction/bidder[1]12.5968.9 (77.4×)963.9 (77.0×)
position on a step//open_auction/bidder[last()]15.4973.1 (63.2×)981.6 (63.7×)
position of a path(//bidder)[1] | (//bidder)[last()]17.31481.3 (85.4×)1487.8 (85.8×)
attribute//@*9.21601.3 (173.2×)1649.2 (178.3×)
attribute//person/@id12.6992.3 (78.7×)989.1 (78.5×)
attribute//*[@id]78.52101.8 (26.8×)2154.0 (27.4×)
attribute//bidder/personref/@person17.81074.3 (60.4×)1066.5 (60.0×)
parent//bidder/..14.9974.1 (65.4×)1005.1 (67.5×)
parent//keyword/parent::*18.81115.5 (59.3×)1128.9 (60.1×)
ancestor//keyword/ancestor::*44.01438.8 (32.7×)1448.6 (33.0×)
ancestor//keyword/ancestor::item19.51047.9 (53.9×)1059.5 (54.5×)
ancestor-or-self//keyword/ancestor-or-self::*47.61597.8 (33.6×)1599.6 (33.6×)
ancestor in a predicate//*[ancestor::*[3]]231.13688.4 (16.0×)3786.8 (16.4×)
following-sibling//bidder/following-sibling::bidder39.41134.1 (28.8×)1161.2 (29.4×)
following-sibling//bidder/following-sibling::*[1]15.51000.4 (64.6×)1012.6 (65.4×)
preceding-sibling//bidder/preceding-sibling::*31.91114.8 (35.0×)1136.7 (35.7×)
preceding-sibling//bidder/preceding-sibling::bidder[1]17.91017.7 (56.9×)1019.4 (57.0×)
following/site/regions/following::*56.1866.8 (15.4×)864.9 (15.4×)
following(//person)[1]/following::*55.5939.8 (16.9×)935.3 (16.8×)
preceding(//closed_auction)[last()]/preceding::*129.62744.2 (21.2×)2707.7 (20.9×)
preceding//closed_auction[1]/preceding::keyword25.72926.9 (114.1×)2940.6 (114.6×)
self//*/self::bidder98.11220.0 (12.4×)1264.7 (12.9×)
namespace//person/namespace::*16.3990.4 (60.9×)1001.6 (61.6×)
predicate//person[profile/@income > 50000]22.82014.9 (88.2×)2133.8 (93.4×)
predicate//*[count(*) > 5]161.82328.7 (14.4×)2384.2 (14.7×)
predicate//item[location = 'United States']19.41998.5 (103.2×)2145.0 (110.7×)
union//bidder | //person28.21957.7 (69.5×)1975.8 (70.2×)
union(//bidder, //person)/..32.31967.2 (61.0×)1992.0 (61.7×)
string valuesum(//closed_auction/price)14.3977.9 (68.5×)993.5 (69.6×)
string valuestring-length(string-join(//person/name, ' '))16.11024.3 (63.5×)1051.2 (65.2×)
existenceexists(//keyword)0.10.2 (1.9×)0.2 (1.9×)
existenceempty(//person[profile/@income > 1000000])20.41993.7 (97.8×)2122.3 (104.1×)
existenceboolean(//item[location = 'United States'])0.12016.5 (15894.4×)2108.1 (16616.3×)
existencenot(//closed_auction[price > 1000000])16.21999.5 (123.6×)2134.3 (131.9×)
first itemshead(//bidder)5.8525.4 (90.9×)548.2 (94.8×)
first items(//item[quantity > 1])[1]0.12025.4 (25762.5×)2144.2 (27274.2×)
first items(//keyword)[3]0.00.2 (10.6×)0.2 (10.6×)
first itemsexactly-one(/site/regions)0.00.1 (3.1×)0.1 (3.2×)
count of a pathcount(//open_auction/bidder)12.6994.3 (79.0×)1018.9 (81.0×)
count of a pathcount(//keyword/ancestor::*)39.31447.2 (36.8×)1477.2 (37.6×)
count of a pathcount(//person//@*)12.31222.1 (99.4×)1261.0 (102.5×)
quantifiersome $person in //person satisfies $person/@id = 'person0'3.9360.6 (93.0×)374.2 (96.5×)
quantifierevery $bidder in //bidder satisfies $bidder/increase17.01007.0 (59.3×)1049.0 (61.8×)
position after ////keyword[2]15.51591.2 (102.4×)1625.6 (104.6×)
position after ////*:keyword[1]39.91668.6 (41.8×)1696.6 (42.5×)
predicate//person[homepage]12.41981.5 (160.3×)2085.6 (168.8×)
attribute//@id[starts-with(., 'person1')]16.21813.6 (111.6×)1993.3 (122.7×)
long path/site/closed_auctions/closed_auction/annotation/description/parlist/listitem/parlist/listitem/text/emph/keyword3.248.2 (15.0×)48.3 (15.0×)
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk26526929.6%0 of 10n/a63n/a
htmlparser2 12.0.0walk6946970.6%0 of 10n/a165n/a
sax 1.6.1walk156215762.2%0 of 10n/a372n/a
saxen 11.2.0walk2392411.0%0 of 10n/a57n/a
saxes 6.0.0walk62463026.1%0 of 10n/a149n/a
stax-xml 1.1.2walk4614625.5%0 of 10n/a110n/a
exemplar 0.3.0read3093101.0%0 of 10074n/a
htmlparser2 12.0.0read7577663.2%0 of 100180n/a
sax 1.6.1read1678181611.4%0 of 100399n/a
saxen 11.2.0read3813862.4%0 of 10091n/a
saxes 6.0.0read7907934.7%0 of 100188n/a
stax-xml 1.1.2read5425939.5%0 of 100129n/a
exemplar 0.3.0tree6706712.9%0 of 10n/a159629
fast-xml-parser 5.11.2tree2800315114.2%0 of 10n/a667666
libxmljs2 0.37.0tree3323361.4%0 of 10n/a79730
saxon-js-2 2.7.0tree312631510.8%0 of 10n/a7441151
saxon-js-3 3.0.0-beta2tree313631972.9%0 of 10n/a7471151
txml 6.0.3tree7877913.0%0 of 10n/a187538
@xmldom/xmldom 0.9.12tree506150660.2%0 of 10n/a12052081
exemplar 0.3.0xdm5825841.3%0 of 10n/a139209
saxon-js-2 2.7.0xdm314031490.5%0 of 10n/a7471151
saxon-js-3 3.0.0-beta2xdm322232262.4%0 of 10n/a7671151
exemplar 0.3.0xpath4995123.7%0 of 100119n/a
saxon-js-2 2.7.0xpath15704159516.8%0 of 1003738n/a
saxon-js-3 3.0.0-beta2xpath15155154102.2%0 of 1003608n/a
exemplar 0.3.0axes233723460.5%0 of 100556n/a
saxon-js-2 2.7.0axes85444867392.8%0 of 10020340n/a
saxon-js-3 3.0.0-beta2axes87676886733.9%0 of 10020871n/a
exemplar 0.3.0compile35362.1%0 of 10n/a8n/a
saxon-js-2 2.7.0compile1011043.3%0 of 10n/a24n/a
saxon-js-3 3.0.0-beta2compile10110310.4%0 of 10n/a24n/a
exemplar 0.3.0stream4544726.6%0 of 100108n/a
htmlparser2 12.0.0stream8258413.7%0 of 100196n/a
sax 1.6.1stream170417182.4%0 of 100406n/a
saxen 11.2.0stream5565632.0%0 of 100132n/a
saxes 6.0.0stream8728853.2%0 of 100208n/a
stax-xml 1.1.2stream9719776.2%0 of 100231n/a
exemplar 0.3.0write5475480.8%0 of 10n/a130n/a
stax-xml 1.1.2write1682169012.1%0 of 10n/a400n/a

Expat recordsets ​

2 documents, 66.0 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamtreexdmxpathwriteTree MBXDM MB
exemplar100%154.3133.9103.986.274.9628.8124.9604139
fast-xml-parser0%–––FAILED–––FAILED–
htmlparser2100%110.077.374.7––––––
libxmljs2100%–––126.1–––641–
sax100%31.127.827.9––––––
saxen100%656.578.562.7––––––
saxes100%100.473.269.1––––––
saxon-js-2100%–––23.123.043.2–490490
saxon-js-3100%–––23.122.842.9–490490
stax-xml100%139.0102.489.2–––49.6––
txml100%–––88.2–––247–
@xmldom/xmldom100%–––37.2–––743–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk4284394.4%0 of 20n/a4271n/a
htmlparser2 12.0.0walk6006000.1%0 of 20n/a5993n/a
sax 1.6.1walk212021230.5%0 of 20n/a21181n/a
saxen 11.2.0walk1011011.1%0 of 20n/a1004n/a
saxes 6.0.0walk6576580.5%0 of 20n/a6566n/a
stax-xml 1.1.2walk4754811.5%0 of 20n/a4743n/a
exemplar 0.3.0read4934941.2%0 of 2004922n/a
htmlparser2 12.0.0read8548652.4%0 of 2008528n/a
sax 1.6.1read237323882.0%0 of 20023708n/a
saxen 11.2.0read8418441.4%0 of 2008399n/a
saxes 6.0.0read9019040.4%0 of 2009001n/a
stax-xml 1.1.2read6446451.8%0 of 2006434n/a
exemplar 0.3.0tree7657827.8%0 of 20n/a7645604
fast-xml-parser 5.11.2tree127512820.9%0 of 22n/a12738310
libxmljs2 0.37.0tree52360616.0%0 of 20n/a5227641
saxon-js-2 2.7.0tree286128660.6%0 of 20n/a28577490
saxon-js-3 3.0.0-beta2tree285928681.7%0 of 20n/a28556490
txml 6.0.3tree7487522.9%0 of 20n/a7476247
@xmldom/xmldom 0.9.12tree177417871.1%0 of 20n/a17725743
exemplar 0.3.0xdm8818865.1%0 of 20n/a8802139
saxon-js-2 2.7.0xdm286528891.5%0 of 20n/a28618490
saxon-js-3 3.0.0-beta2xdm288829492.9%0 of 20n/a28849490
exemplar 0.3.0xpath10512218.1%0 of 2001048n/a
saxon-js-2 2.7.0xpath152615584.6%0 of 20015244n/a
saxon-js-3 3.0.0-beta2xpath153915785.0%0 of 20015373n/a
exemplar 0.3.0stream6356400.9%0 of 2006345n/a
htmlparser2 12.0.0stream8838881.0%0 of 2008820n/a
sax 1.6.1stream236623921.6%0 of 20023639n/a
saxen 11.2.0stream105310672.5%0 of 20010518n/a
saxes 6.0.0stream9559590.5%0 of 2009542n/a
stax-xml 1.1.2stream7397412.5%0 of 2007387n/a
exemplar 0.3.0write5285311.9%0 of 20n/a5275n/a
stax-xml 1.1.2write133013411.0%0 of 20n/a13287n/a

fast-xml-parser first differs in ns_att_test.xml: at 24694: got "&amp;#x27;ANA\" tb3:SALESPERSONNAME=\"JANI", expected "'ANA\" tb3:SALESPERSONNAME=\"JANICE CARROL"

DocBook DTD with entity sets ​

  • Twenty copies of a one-element document whose DTD is large and real: DocBook 5.0, with FreeBSD's author and manual-page entity sets and the 19 ISO character entity sets of xmlcharent, 2.3 MB of declarations read from files. Nearly all the time goes to the DTD, so the dtd workload alone reads it, and the copies give V8 the parses it needs to optimize.
  • The element takes its namespace from DocBook's attribute defaults and holds an author's name and three characters, so a library that does not read the DTD expands nothing and counts differently.
  • Speeds count the DTD files with each copy, as the bytes each parse reads.

20 documents, 46.2 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlydtd
exemplar100%144.4
libxmljs2100%81.4
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0dtd3203220.8%0 of 20003202748n/a
libxmljs2 0.37.0dtd5685690.2%0 of 20005681576n/a

Synthetic, 100 K elements ​

1 document, 6.2 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamtreexdmxpathwriteTree MBXDM MB
exemplar100%266.2182.0130.099.290.543.3101.15918
fast-xml-parser100%–––25.0–––40–
htmlparser2100%107.998.090.5––––––
libxmljs2100%–––182.8–––61–
sax100%48.343.442.1––––––
saxen100%264.3118.392.2––––––
saxes100%104.773.064.2––––––
saxon-js-2100%–––26.226.03.9–8282
saxon-js-3100%–––25.726.23.9–8282
stax-xml100%153.8109.666.0–––47.7––
txml100%–––88.6–––33–
@xmldom/xmldom100%–––16.2–––143–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk23230.2%0 of 10n/a89n/a
htmlparser2 12.0.0walk57570.6%0 of 10n/a220n/a
sax 1.6.1walk1281291.5%0 of 10n/a491n/a
saxen 11.2.0walk23241.6%0 of 10n/a90n/a
saxes 6.0.0walk59603.8%0 of 10n/a226n/a
stax-xml 1.1.2walk40401.5%0 of 10n/a154n/a
exemplar 0.3.0read34352.9%0 of 100130n/a
htmlparser2 12.0.0read63646.9%0 of 100242n/a
sax 1.6.1read1421431.2%0 of 100546n/a
saxen 11.2.0read52530.8%0 of 100200n/a
saxes 6.0.0read84851.4%0 of 100325n/a
stax-xml 1.1.2read56574.2%0 of 100216n/a
exemplar 0.3.0tree626322.6%0 of 10n/a23959
fast-xml-parser 5.11.2tree2462513.8%0 of 10n/a94640
libxmljs2 0.37.0tree34348.0%0 of 10n/a13061
saxon-js-2 2.7.0tree2352373.0%0 of 10n/a90382
saxon-js-3 3.0.0-beta2tree2402403.8%0 of 10n/a92182
txml 6.0.3tree70700.7%0 of 10n/a26733
@xmldom/xmldom 0.9.12tree3823863.3%0 of 10n/a1467143
exemplar 0.3.0xdm68693.1%0 of 10n/a26218
saxon-js-2 2.7.0xdm2372390.7%0 of 10n/a91282
saxon-js-3 3.0.0-beta2xdm2362377.2%0 of 10n/a90682
exemplar 0.3.0xpath1421549.7%0 of 100547n/a
saxon-js-2 2.7.0xpath159015911.0%0 of 1006113n/a
saxon-js-3 3.0.0-beta2xpath158315900.7%0 of 1006085n/a
exemplar 0.3.0stream47482.2%0 of 100182n/a
htmlparser2 12.0.0stream68739.1%0 of 100262n/a
sax 1.6.1stream1461513.5%0 of 100563n/a
saxen 11.2.0stream67674.1%0 of 100257n/a
saxes 6.0.0stream96971.9%0 of 100369n/a
stax-xml 1.1.2stream93952.6%0 of 100359n/a
exemplar 0.3.0write61626.0%0 of 10n/a235n/a
stax-xml 1.1.2write1291303.4%0 of 10n/a497n/a

Synthetic, 1 M elements ​

1 document, 61.7 MB. Speeds are in MB/s, except compile, in expressions per second.

LibraryReads correctlywalkreadstreamtreexdmxpathwriteTree MBXDM MB
exemplar100%306.5219.1141.599.2103.848.8117.7591172
fast-xml-parser100%–––26.5–––395–
htmlparser2100%119.598.291.7––––––
libxmljs2100%–––183.8–––614–
sax100%48.044.143.7––––––
saxen100%338.2129.3101.2––––––
saxes100%107.776.268.8––––––
saxon-js-2100%–––25.725.73.9–813813
saxon-js-3100%–––25.625.33.9–813813
stax-xml100%185.7122.781.1–––47.2––
txml100%–––91.6–––330–
@xmldom/xmldom100%–––15.9–––1435–
Raw measurements

Times here cover every document the workload reads, including those a library throws on or reads wrongly.

LibraryWorkloadBest msMedian msNoiseThrew onWrong outputCount differsns/eventRetained MB
exemplar 0.3.0walk2012038.2%0 of 10n/a77n/a
htmlparser2 12.0.0walk5165232.6%0 of 10n/a199n/a
sax 1.6.1walk128413132.6%0 of 10n/a494n/a
saxen 11.2.0walk1821855.2%0 of 10n/a70n/a
saxes 6.0.0walk5735730.4%0 of 10n/a220n/a
stax-xml 1.1.2walk3323363.4%0 of 10n/a128n/a
exemplar 0.3.0read2812836.4%0 of 100108n/a
htmlparser2 12.0.0read6286331.5%0 of 100242n/a
sax 1.6.1read139914101.5%0 of 100538n/a
saxen 11.2.0read4774770.7%0 of 100183n/a
saxes 6.0.0read8098121.6%0 of 100311n/a
stax-xml 1.1.2read5035061.4%0 of 100193n/a
exemplar 0.3.0tree6226314.4%0 of 10n/a239591
fast-xml-parser 5.11.2tree232823551.3%0 of 10n/a895395
libxmljs2 0.37.0tree3363381.1%0 of 10n/a129614
saxon-js-2 2.7.0tree240024244.0%0 of 10n/a923813
saxon-js-3 3.0.0-beta2tree240524412.5%0 of 10n/a925813
txml 6.0.3tree6736902.5%0 of 10n/a259330
@xmldom/xmldom 0.9.12tree386738880.6%0 of 10n/a14871435
exemplar 0.3.0xdm5946074.0%0 of 10n/a229172
saxon-js-2 2.7.0xdm240424121.7%0 of 10n/a924813
saxon-js-3 3.0.0-beta2xdm243724471.3%0 of 10n/a937813
exemplar 0.3.0xpath126512714.4%0 of 100486n/a
saxon-js-2 2.7.0xpath15631157411.4%0 of 1006011n/a
saxon-js-3 3.0.0-beta2xpath15793157961.1%0 of 1006073n/a
exemplar 0.3.0stream43644511.0%0 of 100168n/a
htmlparser2 12.0.0stream6726893.4%0 of 100259n/a
sax 1.6.1stream141114483.3%0 of 100543n/a
saxen 11.2.0stream6096193.1%0 of 100234n/a
saxes 6.0.0stream8969001.9%0 of 100345n/a
stax-xml 1.1.2stream7607916.4%0 of 100292n/a
exemplar 0.3.0write5245280.8%0 of 10n/a201n/a
stax-xml 1.1.2write130713182.8%0 of 10n/a503n/a

How this was measured ​

  • Correct output only. Before anything is timed, each library's output for every document is compared with exemplar's, which the differential tests check against libxml2. When reading, streaming and reading DTDs, what each library counts in a document while timed must also equal exemplar's count. A library is timed only on the documents it reads correctly.
  • Coverage. A library that reads only part of a dataset correctly is timed on that part. From half of the data, by size, its speed is shown with ‡, and its bars are orange from 95% and red below. Under half, it is shown as FAILED: a part chosen by what the library can read says little about the dataset.
  • Rounds. Every round runs in a fresh process after a warm-up pass, and the best of 3 rounds is reported.
  • No DTDs, but in dtd. Every library, exemplar included, reads each document standalone: without its external DTD or external entities, which most of the libraries cannot read. Entities an internal subset declares are expanded. The dtd workload alone reads the DTD and entities each document refers to, from the files beside it.
  • Prepared data. Each dataset holds only the documents the JDK's Xerces accepts, read as the benchmarks read them.
  • The full method is in benchmarking.md.

Last updated:

Released under the Apache License 2.0.