bench: update @tuananh/sax-parser to 1.4 and police arity probing#17
Merged
Conversation
1.4 skips materializing event arguments for zero-arity listeners, which inflated its no-op benchmark numbers ~3x. The no-op callbacks now declare parameters so every parser materializes arguments, the work all JS parsers do unconditionally. With equal work, 1.4 is a genuine 1.6-2.8x improvement over 1.2 but stays behind eksml on every fixture. Tables, claims, and the native-addon note regenerated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
@tuananh/sax-parser1.2 → 1.4 and re-runs the SAX benchmarks.The arity fast path
1.4's headline numbers came partly from a
Function.lengthprobe: zero-arity listeners skip event-argument materialization entirely. Measured directly on XMLTV: 22,865 ops/s with() => {}vs 7,250 ops/s with(_a, _b) => {}— 3.15x inflation. Every JS parser in the suite materializes arguments unconditionally, so the benchmark's no-op callbacks now declare parameters (same equal-work policy we applied to easysax's lazygetAttr()).Results with equal work
saxinto the htmlparser2/saxes tierBoth SAX tables regenerated (including the attr-heavy fixture column), claims refreshed, and the native-addon note updated to document the arity policy. 838 tests pass.