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>
parking_lot_core 0.9.12, which the arc feature depends on through dashmap, requires Rust 1.71, so the 1.70 check jobs could no longer build. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
criterion 0.4 was a dev-dependency used only by the get_container bench, and its dependencies need Rust 1.80 or newer, so cargo test could not build on 1.71. Move it behind the benchmarks feature with the other benchmark-only dependencies, and drop the rand dev-dependency, which nothing uses any more. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The benchmarks feature now enables criterion, whose dependencies do not build on docs.rs's nightly, and the previous release of this crate, whose docs have the same crate name as these. docs.rs and the CI docs job used all-features, so both failed; list the features instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nothing exercised the owned and boxed constructors of the unsized arenas, which were the lines codecov/patch counted as changed when their lifetimes were made explicit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
append-only-vec 0.1.9 is no_std unless its std feature is on, so depend on it without default features and forward std and portable-atomic to it. That lets the no_std CI checks of intern and intern32 build. They then showed that intern32 itself used std: two PhantomData paths and a size_of_val now come from core, and a leftover debugging println in deep_size_of_interned is gone. intern32 also did not enable the append-only-vec dependency or the container module it uses, so it could not build without intern; it does now. The CI checks of intern32, intern and arena on their own now add spin: without std each needs spin for its mutex, and says so in a compile_error, so they could never pass as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master gained the MSRV, optional-criterion, docs-features and append-only-vec 0.1.9 changes (#69) and the Arena intern_with helper (#68), which this branch had also made. Keep master's versions of those, and this branch's scaling, internment_old and benchmarks feature on top; Arena::intern keeps its explicit lifetime. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Master updated the rand dev-dependency (#70); this branch removes it, since nothing uses rand once the old benchmark is gone, and removes the scaling 0.1 dev-dependency too. 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