perf(fsst): add JavaVsJniFsstBenchmark baseline#292
Merged
Conversation
Captures the pre-rewrite baseline for issue #287's FSST rewrite. The benchmark writes/reads a single high-cardinality Utf8 log-line column (1M rows across 20 chunks) that the cost-based dispatch routes through vortex.fsst — @setup asserts via the inspector that vortex.fsst was actually selected, so a future dispatch change can't silently turn this into a no-op measurement of another encoding. It exercises the existing, unmodified vortex.fsst writer/reader adapters (which don't change until PR 5 of the #287 sequence), so re-running the identical benchmark after the rewrite lands shows the "arc" from slow to fast with zero benchmark-code changes. Measured baseline (JDK 25, Apple silicon, Throughput, -f 1, 5 iters): javaFsstEncode 0.085 ± 0.001 ops/s jniFsstEncode 3.024 ± 0.011 ops/s (Java ~36x slower at encode) javaFsstDecode 5.243 ± 1.146 ops/s jniFsstDecode 33.930 ± 0.494 ops/s (Java ~6.5x slower at decode) Co-Authored-By: Claude Sonnet 5 <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.
Summary
Pulled forward from PR 7 of the #287 FSST rewrite sequence, per request, so we have a "before" baseline to compare against as the rest of the rewrite lands — the "arc from slow to fast."
JavaVsJniFsstBenchmark: writes/reads a synthetic high-cardinality Utf8 log-line column (1M rows) that the cost-based dispatch naturally routes throughvortex.fsst.@Setupverifies via the inspector thatvortex.fsstwas actually selected, so a future dispatch change can't silently turn this into a no-op benchmark of another encoding.vortex.fsstwriter/reader adapters — they don't change until PR 5 of the sequence — so re-running this identical benchmark after the rewrite lands shows the arc with zero benchmark-code changes.Baseline measured (JDK 25, Apple silicon, Throughput,
-f 1, 5 iters — single-fork, so treat as indicative; will re-run at-f 3for the final post-rewrite comparison per this project's own JMH noise guidance):javaFsstEncodejniFsstEncodejavaFsstDecodejniFsstDecodeThe encode gap is dominated by the current sequential 8-probe
longestMatch— exactly what PR 2 (already merged) targets once wired in via PR 5.Test plan
./mvnw verify -pl performance -am -DskipTests— checkstyle/javadoc clean🤖 Generated with Claude Code