Benchmarks
How fast is it?
ZeRechnung was measured against 14 other Go libraries, then against 32 TypeScript, Python and Rust libraries: same files from the official ZUGFeRD corpus, same machine, same harness. Every result is checked before it is timed.
Times of ZeRechnung
Extract the XML
30.2 µs
×2.5 faster than the next Go library
Read the XML into a model
16.9 µs
×7.3 faster than the next Go library
Read and validate
24.3 µs
×5.1 faster than the next Go library
Write the XML
3.0 µs
×6.7 faster than the next Go library
Embed the XML in a PDF
89.2 µs
×5.9 faster than the next Go library
Check a whole Factur-X PDF
74.2 µs
×15 faster than the next Go library
Measured on 17 November 2026 on an Apple M4 Pro, on one goroutine, with ZeRechnung v0.1.0.
Against the other Go libraries
The other libraries read XML with encoding/xml, whose tokenizer alone takes 100 µs on a 13 KB invoice. ZeRechnung has its own XML reader and goes well below that floor. A lazy PDF reader, which reads only the objects it needs, and an incremental update to add the invoice do the rest.
The bars are on a logarithmic scale: each grid line is ten times slower than the one before. Times are medians of three runs.
Extract the XML
EN 16931 PDF, 149 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnung | 30.2 µs | |
| speedata | 75.2 µs ×2.5 | |
| litho | 106 µs ×3.5 | |
| papierleicht | 113 µs ×3.7 | |
| DCNWS | 209 µs ×6.9 | |
| pdfcpu | 317 µs ×10 | |
| fX | 332 µs ×11 | |
| dotwave | 343 µs ×11 | |
| angelo | 356 µs ×12 | |
| kanjo | 386 µs ×13 | |
| gopdfattach | 396 µs ×13 | |
| andee | 516 µs ×17 | |
| taha | fails: it looks for the XML with a regular expression, which misses compressed streams | |
| 10 µs100 µs1 ms | ||
Read the XML into a model
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnung | 16.9 µs | |
| fXloses the VAT breakdown | 124 µs ×7.3 | |
| angelo | 131 µs ×7.8 | |
| dotwave | 144 µs ×8.5 | |
| tahastores amounts as whole cents | 147 µs ×8.7 | |
| DCNWS | 165 µs ×9.8 | |
| andee | 182 µs ×11 | |
| speedata | 225 µs ×13 | |
| kanjo | 253 µs ×15 | |
| gobl.de | 564 µs ×33 | |
| 10 µs100 µs1 ms |
Dashed line: 100 µs, the time encoding/xml takes just to split the file into tokens.
Read and validate
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation | Valid invoices reported as invalid |
|---|---|---|---|
| ZeRechnung | 24.3 µs | 6/26 | |
| fX | 123 µs ×5.1 | 26/26 | |
| pdf0 | 126 µs ×5.2 | 6/26 | |
| taha | 147 µs ×6.0 | 15/26 | |
| angelo | 172 µs ×7.1 | 4/26 | |
| andee | 208 µs ×8.6 | 22/26 | |
| kanjo | 293 µs ×12 | 9/26 | |
| DCNWS | 754 µs ×31 | 2/26 | |
| speedata | 1.28 ms ×53 | 0/26 | |
| gobl.de | 1.77 ms ×73 | 20/26 | |
| papierleicht | 14.65 ms ×603 | 6/26 | |
| 10 µs100 µs1 ms10 ms100 ms |
Last column: how many of the 26 valid invoices of the corpus the library reports as invalid. The official schematrons report 6, so 6 is the right answer.
Write the XML
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnung | 3.0 µs | |
| fX | 20.2 µs ×6.7 | |
| dotwave | 22.1 µs ×7.4 | |
| speedata | 30.5 µs ×10 | |
| DCNWS | 36.2 µs ×12 | |
| kanjo | 98.3 µs ×33 | |
| andee | 311 µs ×104 | |
| taha | 652 µs ×217 | |
| 1 µs10 µs100 µs1 ms |
Embed the XML in a PDF
host PDF with xref streams, 144 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnung | 89.2 µs | |
| pdf0 | 522 µs ×5.9 | |
| pdfcpulow-level recipe written for the benchmark | 546 µs ×6.1 | |
| gopdfattach | 1.12 ms ×13 | |
| dotwave | 1.24 ms ×14 | |
| DCNWS | 1.66 ms ×19 | |
| lithoconverts and rewrites the whole PDF | 36.16 ms ×405 | |
| kanjo | returns a PDF that cannot be read back | |
| andee | returns a PDF that cannot be read back | |
| 10 µs100 µs1 ms10 ms100 ms | ||
Check a whole Factur-X PDF
EN 16931 PDF, 149 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnung | 74.2 µs | |
| DCNWS | 1.14 ms ×15 | |
| pdf0 | 2.20 ms ×30 | |
| papierleicht | 15.78 ms ×213 | |
| litho | 19.87 ms ×268 | |
| 10 µs100 µs1 ms10 ms100 ms |
Against other languages
For each operation, the fastest library of each language among those that succeed. ZeRechnung is the fastest in 13 columns out of 16. Rust comes closest, without applying all the EN 16931 rules. The exceptions are explained on the wiki.
Extract the XML
EN 16931 PDF, 149 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 29.3 µs | |
| einvoice-validatorRust | 32.5 µs ×1.1 | |
| speedataGo | 75.2 µs ×2.6 | |
| zugferd-pdfPython | 78.5 µs ×2.7 | |
| @attestwire/en16931TypeScript | 184 µs ×6.3 | |
| 10 µs100 µs1 ms |
Read the XML into a model
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 16.3 µs | |
| zugferd-rsRust | 24.0 µs ×1.5 | |
| @ekwo-ai/factur-xTypeScript | 69.6 µs ×4.3 | |
| fXGo | 124 µs ×7.6 | |
| pychevalPythonreads 7 of the 26 XML files | 221 µs ×14 | |
| 10 µs100 µs1 ms |
Read the XML into a model
CII XML, 1.3 MB, with a base64 attachment| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| mcp-einvoicing-dePythonlxml, written in C, keeps the attachment as text | 702 µs | |
| ZeRechnungGo | 1.11 ms ×1.6 | |
| pdf-invoiceRust | 1.63 ms ×2.3 | |
| @conformo/toolkitTypeScript | 1.74 ms ×2.5 | |
| dotwaveGo | 6.76 ms ×9.6 | |
| 100 µs1 ms10 ms |
Validate with all EN 16931 rules
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 23.1 µs | |
| pdf0Go | 126 µs ×5.5 | |
| einvoice-validatorRust | 473 µs ×20 | |
| @sweberdev/summandTypeScript | 802 µs ×35 | |
| saxonchePythonwith the official XSLT | 903 µs ×39 | |
| 10 µs100 µs1 ms |
Write the XML
CII XML, 13 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 3.1 µs | |
| zugferd-rsRust | 6.7 µs ×2.2 | |
| @ekwo-ai/factur-xTypeScriptmodel built by hand | 10.9 µs ×3.5 | |
| fXGo | 20.2 µs ×6.5 | |
| pychevalPython | 76.6 µs ×25 | |
| 1 µs10 µs100 µs |
Embed the XML in a PDF
host PDF with xref streams, 144 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 87.8 µs | |
| pdf-invoiceRust | 178 µs ×2.0 | |
| pdf0Go | 522 µs ×5.9 | |
| mcp-einvoicing-dePython | 662 µs ×7.5 | |
| @stackforge-eu/factur-xTypeScript | 1.14 ms ×13 | |
| 10 µs100 µs1 ms10 ms |
Check a whole Factur-X PDF
EN 16931 PDF, 149 KB| Library | Time, logarithmic scale | Time per operation |
|---|---|---|
| ZeRechnungGo | 75.0 µs | |
| zugferd-pdfPythonchecks the container only | 212 µs ×2.8 | |
| @attestwire/en16931TypeScript | 359 µs ×4.8 | |
| en16931Rust | 479 µs ×6.4 | |
| DCNWSGo | 1.14 ms ×15 | |
| 10 µs100 µs1 ms10 ms |
Fast, and right
Speed means nothing if the verdicts are wrong. On the 26 valid invoices of the official corpus, the official schematrons report 6: rule BR-CL-25 twice, and CII-SR-465 on the four XRECHNUNG examples. ZeRechnung reports exactly these 6, and extracts the XML of all 104 PDF files of the corpus. Its CI also compares every pull request with the KoSIT and Mustang validators.
Among the 32 libraries in other languages, six give the verdicts of the reference. The most downloaded ones check only the XSD schema, or only generate invoices.
Method
One module per library, called through its public API in the most direct way its documentation offers. Every timing starts with a correctness check: the extracted XML must be a CII invoice, and a PDF produced by an injection must be read back. The harnesses are in the repository, so anyone can run them again.
| Machine | Apple M4 Pro · 24 GB · macOS 26.6 |
|---|---|
| Go | 1.26.4 · go test -bench . -benchmem -count 3 -benchtime 1s |
| TypeScript | Node 22.15.0 |
| Python | CPython 3.13.18 |
| Rust | rustc 1.93.1, release |
| Value shown | median of 3 runs, on one thread, with the bytes already in memory |