Repository navigation
Conversation
Without it, --features intern32 failed to compile with an unresolved deepsize crate, which the benchmarks need. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
scaling 0.9 replaces bench/bench_gen_env with declared benchmarks, groups and baselines, so benches/bench.rs is rewritten as four binaries: - versions: this release against the previous one (internment_old, 0.8.6), - controls: each release against itself, for the noise floor, - libraries: the interners against each other, String and arc-interner, - contended: the 100000-value workloads, from one thread and from fifty. scaling needs Rust 1.81, so it and internment_old are optional dependencies behind a new benchmarks feature rather than dev-dependencies, which the 1.70 test job would build. bench stays a leaf feature (it only exposes benchmarking_only_clear_interns), so that when this version is the previous release the next one's benchmarks do not pull in a chain of every release before it. This also fixes the old bench, which did not compile because bench did not enable arc-interner. Adds a CI job that builds the benchmarks, a README section on running them, and plans/scaling-0.9.md, which says why and how to carry on each release. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
scaling 0.9.1 accepts `ty` fragments of macro_rules! in a benchmark's signature, so vs! and twins! take ordinary types instead of token trees. Also fixes the warnings `cargo bench --features benchmarks` printed: the unused macros and import in the benchmark binaries, the elided lifetimes in arena.rs, the unused TestStruct and TestStructCount in the tests, and an import of println that was only needed with the tinyset feature. Co-Authored-By: Claude Sonnet 5.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
scaling0.9 has nobench/bench_gen_env, sobenches/bench.rs(the only user ofscaling) is rewritten, as four binaries:versions: this release against the previous published one (internment_old, 0.8.6) at 1% accuracy, witholdas the baseline of every group.controls: each release against itself, so there is a noise floor to judgeversionsby.libraries:Intern,NewIntern,ArcIntern,Intern32,arc-internerand plainStrings, to within 10%.contended: the old 100000-value workloads, one group per workload and contention level, one candidate per interner.Run with
cargo bench --features benchmarks --bench versions(README has a new section).Design
scalingis an optional dependency, not a dev-dependency. It needs Rust 1.81 andcargo testbuilds dev-dependencies, so a dev-dependency failscargo +1.71 test --no-run.internment_oldis optional too (a dev-dependency cannot be).benchis unchanged and stays a leaf (it only exposesbenchmarking_only_clear_interns); the newbenchmarksaddsscaling,internment_oldandarc-interner. This matters for later: once this version is "the previous release", the next one enables itsbench, and that must not pull in scaling and the release before it, and so on down. The split has to ship with the first release that has these benchmarks.internment_oldpin;plans/scaling-0.9.mddescribes that cycle and the reasoning.benchdid not enablearc-interner).Behaviour changes in what is measured
compare/hashis nowlookup: the old two sets had nothing in common, so its removals never found anything.lookupdoes the same hashing and comparing read-only, which lets the sets be built once, untimed.sortsorts references (so aStringbaseline is not charged for copying) and starts from a fixed shuffled order; the old one got a random order fromHashSetiteration.Intern32is a new candidate wherever the others run.Also
src/intern32.rs: one#[cfg(feature = "deepsize")]on an impl whose bound nameddeepsizeunconditionally, so--features intern32compiles.cargo check --benches --features benchmarkson stable.Not done / known
msrvjob'scargo testvery likely fails today from a fresh resolve (criterion0.4 pulls inhalf2.7.1, needing 1.81, andtextwrap0.16.4, needing 1.88), independent of this change; I checked with scratch copies but could not see recent CI runs.cargo check --no-default-features --features internand--features intern32already fail on master.controlsseparate the benchmark code from the library but do not build a second copy of the previous release as its own package.versionsalready shows differences from 0.8.6, e.g.Intern<String> sortabout +12% andIntern<i64>::new randomabout -18%, which were not measured at full accuracy.Test plan
cargo check --benches --features benchmarks(stable)cargo test --all-features -- --test-threads=1(stable)cargo +1.71 check, with and without--features arc, from a fresh lockfileversions,controls,librariesandcontended(the latter filtered) run briefly and produce resultscontendedrun on a machine with reserved or unpinned CPUs🤖 Generated with Claude Code