perf: fused normalization and input fact collection - #176
Merged
Conversation
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.
Summary
Validation
npm cinpm run checknpm run benchmark:profanityonorigin/mainand this branch with the same machine and command shapeBenchmark Evidence
Baseline
origin/main:createProfanityFilter(): 7.6723 avg mscheck cyrillic clean: 0.0191 avg mscheck long clean: 0.9655 avg mscheck loose match: 0.0110 avg mscheck long late match: 0.2658 avg msscanner scan short match: 0.0150 avg msanalyze short match: 0.0129 avg mscensor short match: 0.0169 avg msThis branch:
createProfanityFilter(): 7.0296 avg mscheck cyrillic clean: 0.0190 avg mscheck long clean: 0.9700 avg mscheck loose match: 0.0112 avg mscheck long late match: 0.2645 avg msscanner scan short match: 0.0137 avg msanalyze short match: 0.0119 avg mscensor short match: 0.0126 avg msInput preparation microbenchmark:
Fused preparation improves the measured preparation path by about 23% while retaining a flat output footprint. An eager-fused boolean prototype regressed
check long late matchfrom 0.2658 to 0.4204 avg ms, socheck()intentionally retains strict-first separate facts after a miss.Compatibility Notes
Closes #170
No publish, no merge, no tag/release.