diff --git a/eksml/BENCHMARKS.md b/eksml/BENCHMARKS.md index c70d034..af4a98f 100644 --- a/eksml/BENCHMARKS.md +++ b/eksml/BENCHMARKS.md @@ -111,6 +111,14 @@ Chunked streaming parse where each parser tokenizes SAX events and builds a full 15,003 op/s 13,719 op/s + + @tuananh/sax-parser + 24,238 op/s + 19,238 op/s + 12,849 op/s + 18,062 op/s + 11,681 op/s + easysax 66,566 op/s @@ -127,14 +135,6 @@ Chunked streaming parse where each parser tokenizes SAX events and builds a full 5,186 op/s 9,352 op/s - - saxes - 27,902 op/s - 5,884 op/s - 6,687 op/s - 6,013 op/s - 5,117 op/s - htmlparser2 26,433 op/s @@ -144,12 +144,12 @@ Chunked streaming parse where each parser tokenizes SAX events and builds a full 6,791 op/s - @tuananh/sax-parser - 24,238 op/s - 19,238 op/s - 12,849 op/s - 18,062 op/s - 11,681 op/s + saxes + 27,902 op/s + 5,884 op/s + 6,687 op/s + 6,013 op/s + 5,117 op/s sax @@ -206,6 +206,14 @@ Pure scanner throughput with no downstream work -- isolates the tokenizer's raw 11,824 op/s 11,712 op/s + + @tuananh/sax-parser + 22,011 op/s + 16,577 op/s + 14,692 op/s + 15,889 op/s + 11,361 op/s + saxes 35,117 op/s @@ -222,14 +230,6 @@ Pure scanner throughput with no downstream work -- isolates the tokenizer's raw 7,028 op/s 7,186 op/s - - @tuananh/sax-parser - 22,011 op/s - 16,577 op/s - 14,692 op/s - 15,889 op/s - 11,361 op/s - sax 14,798 op/s @@ -348,6 +348,7 @@ All fixtures are in [`test/fixtures/`](./test/fixtures/). ## Methodology - **Tool**: [Vitest bench](https://vitest.dev/guide/features.html#benchmarking) (wraps [tinybench](https://github.com/tinylibs/tinybench)) +- **Table ordering**: Rows are ordered by the geometric mean of op/s across the table's fixtures (an arithmetic mean would be dominated by the smallest, fastest fixture). A library that cannot parse a fixture is ranked against its per-fixture results, not rewarded for the gap: tXml sits below libraries that beat it on every fixture it completes. - **Warmup**: Default tinybench warmup iterations - **Environment**: Single-threaded, synchronous execution on Node.js - **Parser reuse**: In the SAX streaming and tokenization suites, every parser is constructed once and reused across iterations (all measured parsers support this; verified by comparing event streams across runs). This measures steady-state parse throughput rather than constructor cost. XmlParseStream is the exception, web streams are single-use, so it pays its constructor per iteration.