perf(benchmark): add Piscina(1) vs direct lintWorker comparison - #192
Merged
Merged
Conversation
luojiyin1987
force-pushed
the
bench/piscina-vs-direct
branch
2 times, most recently
from
September 13, 2026 07:01
6b7817a to
5759d81
Compare
Compares Piscina(maxThreads=1) vs direct lintWorker invocation. Both paths call the same worker function: readFile → fixMarkdown → toBatchLintItem The only difference is whether lintWorker is called directly or through Piscina + worker thread + structured clone. Results (fix mode, single file, 3 runs each): | File | Piscina RSS | Direct RSS | Δ RSS | Piscina wall | Direct wall | Δ wall | |------|-------------|------------|---------|--------------|-------------|--------| | 1M | 564 MiB | 377 MiB | +49.7% | 1.0s | 0.9s | +14.8% | | 2M | 802 MiB | 1029 MiB | -22.0% | 1.7s | 1.9s | -6.6% | | 4M | 1839 MiB | 1322 MiB | +39.0% | 3.6s | 3.2s | +14.5% | | 6M | 1289 MiB | 1225 MiB | +5.3% | 4.1s | 4.0s | +3.0% | | 8M | 2869 MiB | 2374 MiB | +20.9% | 6.6s | 6.1s | +7.7% | | 10M | 1883 MiB | 2829 MiB | -33.4% | 6.2s | 7.9s | -21.0% | | 12M | 3172 MiB | 2879 MiB | +10.2% | 9.5s | 8.3s | +14.5% | Observations: - Data is noisy. V8 GC timing and system load variation affect results. - 2 MiB and 10 MiB show Piscina lower, others show Piscina higher. - No clear crossover point. Results vary run-to-run. - Requires more runs per cell to reduce noise.
luojiyin1987
force-pushed
the
bench/piscina-vs-direct
branch
from
September 13, 2026 07:07
5759d81 to
4e210ef
Compare
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.
Both paths invoke the same compiled lintWorker.
Results are noisy: