Repository navigation
docs: compare all ten BENCH_SPEC rows against the C corelib - #115
Merged
Merged
Conversation
corelib-c-cpp now publishes Callgrind figures for the full BENCH_SPEC suite, so the head-to-head table no longer has to stop at four rows and park the other six in a this-port-only table with "no C figures exist for them yet". Merge the two into one ten-row comparison, and refresh the C column, which was stale in every row it already had (124 992 -> 125 999, 908 -> 966, 289 941 -> 300 432, 2 057 -> 2 109). Percentages are recomputed against it. The merged table contradicts a claim the old one supported: this port does not win "across the board". On encode: blob 1MB streaming the C core needs 1.3x fewer instructions, because it has no memcpy fast path to fall out of when a run stops fitting the output buffer, while this port falls back to a byte-at-a-time loop and pays 13x its own one-shot figure. Say so explicitly, name what would close it, and bound the wins it does have at 1.4x to 10x. Also fix the decode-model row of the feature table, which still advertised "views into" the caller's buffer. There is no borrowing destination since read(std::string_view&) was dropped in f688cf3, as this README already says under Memory handling. The this-port column is unchanged and reproduces on the current tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
corelib-c-cppnow publishes Callgrind figures for the full BENCH_SPEC suite, so the head-to-head table in## Benchmarksno longer has to stop at four rows and park the other six in a this-port-only table captioned "no C figures exist for them yet".What changed
One ten-row comparison instead of two tables. The six rows that had no counterpart (
blob 1MB×3,composite×3) move into the head-to-head table.The C column was stale in every row it already had and is refreshed from
corelib-c-cpp's current published table:Percentages are recomputed against it (
encode: typical−75 % → −77 %,decode: typical−38 % → −40 %)."Wins across the board" is no longer true, and the README now says so. On
encode: blob 1MB streamingthe C core needs 1.3× fewer instructions (10 004 819 against 13 009 127): it has nomemcpyfast path to fall out of, so streaming costs it what the one-shot write cost (+0.05 %), while this port falls back to a byte-at-a-time loop the moment a run stops fitting the output buffer and pays 13× its own one-shot figure. The row is called out explicitly, with what would close it (a boundedmemcpyper flush window), and the wins it does have are bounded at 1.4×–10× rather than left open.Drive-by fix. The feature table's decode-model row still advertised "In place over caller buffer, views into it". There has been no borrowing destination since
read(std::string_view&)was dropped in f688cf3 — as this same README states under Memory handling. It now says each value is copied out beforefeed()returns.Provenance of the numbers
The
this (pure C++20)column is unchanged and reproduces exactly on the current tree (bash bench/run_callgrind.sh, all ten rows). The C and C++ wrapper columns arecorelib-c-cpp's published reading, taken on its machine with the same script — the README now states that split instead of implying one joint run. Mixing them is legitimate precisely because Ir/op depends on the executed code and not the host, which is the reason both ports quote it.ctest -R test_readme_structurepasses (all CORELIB_PLAN §9 checks). No code changed.🤖 Generated with Claude Code