Skip to content

Re-measure the performance report for 2.0.0 - #134

Merged
shanikawm merged 2 commits into
mainfrom
docs/benchmark-2.0.0
Sep 18, 2026
Merged

shanikawm merged 2 commits into
mainfrom
docs/benchmark-2.0.0

Conversation

@shanikawm

Copy link
Copy Markdown
Contributor

What this does

tutorials/benchmark/PERFORMANCE.md still described truecell 1.0.0 on an Apple M4 Pro (3 Aug 2026). That made two things false for 2.0.0:

  • The clustering rows timed the old single igraph pass. It beat Seurat on 3 of 4 datasets by finding fewer clusters.
  • DESeq2 had no row, because truecell's was a pseudobulk test then.

This re-runs the full sweep (sweep.sh, 41 min) on this machine (Apple M5 Pro, 18 cores, macOS 27.0) at main b2f0561, and rewrites the report from the new results.

Headline results (the tally comes from make_report.py):

  • Tally: truecell is faster in 45 of 68 like-for-like steps, slower in 22, and within 5 % in 1.

  • Standard workflow: Seurat is still 1.2–2.5x faster end to end. As before, that's seeded UMAP and presto's Wilcoxon. With the seed dropped, truecell is 1.2–1.4x faster from 8k cells up.

  • Clustering now runs Seurat's optimiser on both sides. The same number of clusters on all four datasets (9, 12, 16, 8), at 1.1–1.2x Seurat's time from 8k cells up.

  • DESeq2 has a row for the first time: 2.50 s against 9.67 s, 3.9x faster. But it takes the process tree from under 1 GB to 5.2 GB (Seurat 2.5 GB). pydeseq2 starts one worker process per core (18 here) through multiprocessing.cpu_count(), truecell doesn't limit it, and the workers stay alive after the call. Measured separately with pydeseq2 held to one worker, with identical output:

    • the DE bench's call: 4.2 s and 1.2 GB;
    • the out-of-core tutorial: 5.6 GB, against 11.5 GB with the default.

    The report says so and lists it under "what to do". No code changes here.

How the old material is kept:

  • The M4 Pro sweep moves to results_m4pro/ (a git rename, nothing lost).
  • Sections 2.1 (reference BLAS against Accelerate) and 2.4 (the densify fix) keep that sweep's findings and are labelled as M4 Pro / 1.0.0 measurements.
  • compare_sweeps.py commands in the README now point at results_m4pro/.
  • The M4 Pro and M5 Pro sweeps are not diffed against each other, because the machine and the release both changed.

Also:

  • The benchmark README gives the right bench count (nine, not eight) and runtime.
  • It gains a locale note: this sweep's shell had no LANG, so R ran under the C locale and drew the em dashes in nine committed R figures as "...". Those figures were restored. The same R steps under the C locale reproduced every reported number (14 tutorials checked against the UTF-8 reference reports).

Verification

  • All 9 benches, both arms, completed. Anchors match between arms (e.g. clusters 9/9, 12/12, 16/16, 8/8; find_all_markers 3514/3514 on PBMC 3k).
  • mkdocs build --strict passes, and the new in-page anchors (#25-clustering-runs-seurats-optimiser, #5-named-operations) resolve.
  • The sweep's tutorial-script phase left every Python figure unchanged (the committed ones match main).
  • Every number in the prose was computed from results/*.json with make_report's own loader, not read off by eye.

🤖 Generated with Claude Code

shanikawm and others added 2 commits September 18, 2026 14:54
PERFORMANCE.md still described truecell 1.0.0 on an Apple M4 Pro, which timed
the old single igraph Louvain pass and had no DESeq2 row. The full sweep is
re-run on an Apple M5 Pro at main b2f0561 and the report rewritten from it.

- 45 of 68 like-for-like steps faster, 22 slower, 1 within 5 %; the standard
  workflow still goes to Seurat by 1.2-2.5x, on seeded UMAP and presto.
- Clustering is Seurat's optimiser on both sides: the same cluster counts on
  all four datasets, at 1.1-1.2x Seurat's time from 8k cells up.
- DESeq2's first row: 3.9x faster than Seurat, but pydeseq2 starts one
  worker process per core and the process tree peaks at 5.2 GB; held to one
  worker the call is 4.2 s and 1.2 GB with identical output (measured
  separately), which the report lists under what to do.
- The M4 Pro sweep moves to results_m4pro/; the report's two findings from it
  (reference BLAS, the densify fix) are labelled as such.
- Benchmark README: nine benches, not eight; runtime; a note that a shell
  without a UTF-8 locale makes R draw the figures' em dashes as "...".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@shanikawm
shanikawm merged commit 018479c into main Sep 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant