This report presents new benchmark results for Xpact-core, a pure-Eiffel XML parser porting the behaviour of the widely-used C library eXpat (libexpat). It accompanies the paper Finding a Billion-User Project for Eiffel: How DbC Catches Security Flaws Rust Misses, where the motivation and architecture of Xpact-core are described in detail.
Getting Xpact to run quickly turned out to be relatively straightforward. The hard part was making it correct — matching eXpat's output exactly across every edge case: predefined entity resolution, partial-token buffer boundaries, CDATA section handling, namespace attribute semantics, and character-reference encoding. A mismatch in any one of these produces a different CRC-32 value from the two parsers, which is immediately detectable.
To verify correctness and measure performance in the same run, I
had Claude write a C program — xml_crc_32.c
— that serves two purposes:
The five data types are text content, CDATA sections, comments,
start-tag names, and attribute values. The Eiffel counterpart is CRC_32_GENERATOR.
When both programs produce identical CRC-32 values for a given
file and data type, the parsers are in agreement for that
combination.
Earlier in the project I used a simpler program — xml_tag_counter.c
— which generates a table of tag-name occurrence frequencies. Its
Eiffel counterpart is TAG_COUNTER.
This confirmed basic parse-tree correctness but cannot detect
errors in text content or attribute values.
Benchmark sessions are driven by two scripts — benchmark_Xpact_crc_32.sh
and benchmark_Xpact_tag_count.sh
— which run both parsers against each test file and append results
to log files, allowing performance regressions to be tracked over
time.
Read the full report here: https://eiffel-loop.com/article/Xpact-benchmark-report.html
-- SmartDevelopersUseUnderScoresInTheirIdentifiersBecause_it_is_much_easier_to_read

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/eb127f4f-50cf-45b5-8959-5a78eff2ec40%40eiffel-loop.com.

