Repository navigation
perf: rerun the full benchmark and refresh the published results - #205
Merged
Merged
Conversation
|
Coverage after merging docs/benchmark-rerun-40f3a42 into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Part of #168.
This PR reruns the full benchmark suite on
mainat40f3a42, the source after #200, #201 and #202, and replaces every published figure with the results of that one batch. Until now the published results were the batch of #199 atce0c25ewith theshift-and-updatecells that #200 measured again; #201 and #202 changed runtime code after both.perf-testing/reports/SUMMARY.md). Every result, table and limit comes from this batch, including the shared-process control, the process-order control, memory, the Immer plugin datasets and the local budget gate. The "changes since the previous batch" section compares this batch with the previously published cells, with an A/B of the sources ofce0c25eand40f3a42for the cells whose comparisons changed. The PR sections of perf: change the copy of a Set draft directly, and keep the changes of a Set draft that left its key #195, perf: read the type of a draft from its state when applying patches #196, perf: find a moved array element's original index from the offset of its move #200 and fix: bound the search for repeated moved array elements and type maybe-async recipes of primitive states #202 keep their comparisons withmain, and their cross-library figures come from this batch. The history gains an entry for the batch of perf: rerun the full benchmark on main and refresh the published results #199, and the archive index describes the new one.Bundle sizes are unchanged. Measured the README's way (esbuild 0.24.0, browser ESM, minified, Brotli),
createalone bundles to 7,909 bytes andcreatewithapply,currentandoriginalto 8,535 bytes, still 7.9 kB and 8.5 kB.size-limitreports 8.64 / 7.58 / 8.52 kB, andsize:compareshows no change against the baseline.Results
Cells faster / within 5% / slower, and the geometric mean of comparator time over Mutative time.
class-wide-updateat 1,000 rows is slower as before. The same scenario without patches at 100 and 10,000 rows moved by less than 2% and crossed the 5% line.addandconcatat 100 rows are slower in processes that overlapped those of Immer.add,concat,update-largeObject1andpush-and-insertat 100 rows andobject-deleteat 1,000 rows. The processes of these cells varied by up to 1.4 times in both batches.Changes against the previously published cells
ce0c25eand40f3a42, with Mutative alone in each process, measured every mode ofadd,concat,push-and-insert,removeandupdate-largeObject1at 100 rows and ofobject-deleteandpush-and-insertat 1,000 rows. Ten more rounds measuredmutation-density-100pctat 10,000 rows, whose processes without auto-freeze and with patches were all slower than those of the previous batch, by 5.2%, andarray-splice-remove-nestedat 100 rows, whose moves perf: find a moved array element's original index from the offset of its move #200 changed, slower by 2.5%.40f3a42in more than 7 of the 10 rounds, both by less than 2%:concatwith patches and without auto-freeze, andmutation-density-100pctwith auto-freeze and without patches.push-and-insertwith auto-freeze at 100 rows took 5–7% longer on geometric mean, but was slower in only 5 and 6 of the 10 rounds, with processes spread over 117–164 µs for both sources. So the changes of perf: find a moved array element's original index from the offset of its move #200, fix: harden apply() for Set positions and mutable root replacement, and fix development checks and recipe types #201 and fix: bound the search for repeated moved array elements and type maybe-async recipes of primitive states #202 did not move these cells beyond the spread of their processes, and the new slower cells come from that spread.Checks
mainat40f3a42with its own frozen-lockfile install, unchanged before and after. Its production artifactcb6464f3…is byte-identical to a build in the repository. The batch took 7 h 12 min on the M1 Max, and all 21 steps succeeded. Each of the 2,400 timing processes validated its scenarios before timing.ci.mjs --self-control) passed all 222 decisions of the five groups; latency ratios 0.970–1.109.pnpm benchmark:immer:checkvalidated 1,240 scenario/library/freeze/patch combinations,pnpm test:benchmarkspasses (35 tests), andpnpm sizepasses.pnpm format --checkpasses; on the edited Markdown files,oxfmt --checkreports the same table-padding differences as onmain.perf-testing/results/2026-10-12/, and the A/B rounds inperf-testing/results/2026-10-12-ab/and2026-10-12-ab2/, as for the previous batches. The archive policy'sperf-reports-*release was not created.Commits
perf: record the benchmark of main at 40f3a42 in the performance summarydocs: refresh the README's benchmark figures from the benchmark of 40f3a42docs: refresh the website's benchmark figures from the benchmark of 40f3a42docs: refresh the process order example in the benchmark guide