ptx: add benchmark#13480
Open
Aisha630 wants to merge 5 commits into
Open
Conversation
sylvestre
reviewed
Jul 21, 2026
sylvestre
reviewed
Jul 21, 2026
Contributor
|
Can we use file for benchmark and use |
Author
Done. Removed the extra dependencies as well. I did the redirection earlier because running the benchmark locally was flooding the terminal. But I suppose that's a non-issue. |
|
GNU testsuite comparison: |
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.
ptx: add benchmark
Summary
I'm adding Divan benchmarks for
ptx.This is a benchmark-only change. No utility code is touched.
Why
ptxhad no benchmark. Its cost is dominated by converting keyword byte offsets to character offsets while building the output, which grows with the line length. So the benchmarks hold the total input size roughly constant and vary the line length, which is what surfaces that behavior. It also gives us a baseline to measure the offset-conversion optimization I'm proposing separately.Benchmarks
ptx_short_lines100_000linesptx_long_lines100linesptx_input_references_short_lines100_000lines-r, short linesptx_input_references_long_lines100lines-ron fewer, longer linesI followed the guidelines in the performance.md file and drew inspiration from the
tr,nl,catbenchmarks that were already set up.