Benchmark charts
Speedup distribution
Each dot is one finalized dataset/thread run on WindowsThread sweep
Speedup across finalized thread counts on WindowsMemory
Baseline vs optimized peak memory on WindowsWhat is accelerated
This task targets slingshot::slingshot in slingshot. The benchmarked result
preserves the declared scientific output gate while reducing CPU runtime on the listed datasets.
Also searched as: trajectory, pseudotime, lineage, trajectory inference.
Supported scope
The patch replaces only the S4 method getCurves,PseudotimeOrdering (the curve-fitting stage that slingshot() invokes internally after getLineages); the lineage/MST inference stage of slingshot() (start.clus, end.clus, dist.method, use.median, omega,… Read full supported scope
The patch replaces only the S4 method getCurves,PseudotimeOrdering (the curve-fitting stage that slingshot() invokes internally after getLineages); the lineage/MST inference stage of slingshot() (start.clus, end.clus, dist.method, use.median, omega, omega_scale, times) is NOT patched and runs upstream unchanged. fast_getCurves reimplements the full getCurves parameter surface and branches on every algorithmic argument: shrink (logical or numeric in [0,1]), extend in {"y","n","pc1"}, reweight, reassign, thresh, maxit, stretch, approx_points (NULL->150 if nrow>150 else FALSE, or explicit), smoother in {"smooth.spline","loess"}, shrink.method (passed through to slingshot's .percent_shrinkage), and allow.breaks. It handles single-lineage (L=1 -> sequential lapply), single-cluster (K=1, PCA extension), and multi-cluster branching/shrinkage. There are no NotImplementedError/stop() guards that reject any parameter value, so it nominally accepts the whole getCurves API. The benchmarked default config (shrink=TRUE, extend="y", reweight=TRUE, reassign=TRUE, smoother="smooth.spline", approx_points=NULL) is fully exercised and passes the task metric thresholds. CRITICAL CAVEAT: even within its supported scope the fast path is an APPROXIMATION, not bit-exact: (1) smooth.spline spar caching reuses the previous fit's spar across coordinate dimensions when lambda/weights match, bypassing the per-dim df-search cross-validation; (2) the smoother returns fit$y[match(lambda,fit$x)] instead of predict.smooth.spline; (3) the initial curve skeleton is resampled to approx_points BEFORE the second full-data projection (upstream projects onto the dense skeleton then resamples). These degrade pseudotime_spearman/weight_pearson below 1.0 (about 0.985 / 0.970 on the tiny tier per the audit) even at default args.
Out-of-scope behavior
silent possibly wrong
Show detailed speedup table 10 runs
| Dataset | Tier | Platform | Threads | Baseline | Optimized | Speedup | Memory | Concordance | Pass |
|---|---|---|---|---|---|---|---|---|---|
gastrulation_ood_large | ood_large | Windows | 1 | 5.31 min | 2.49 min | 2.13× | 1.0 → 1.1 GB | — | pass |
gastrulation_ood_xlarge | ood_xlarge | Windows | 1 | 22.01 min | 9.37 min | 2.35× | 1.4 → 1.3 GB | — | pass |
pbmc200k_glaucoma_large | large | Windows | 1 | 6.97 min | 3.14 min | 2.22× | 1.1 → 1.1 GB | — | pass |
pbmc68k_medium | medium | Windows | 1 | 3.67 min | 1.81 min | 2.03× | 1.0 → 1.0 GB | — | pass |
pbmc68k_tiny | small | Windows | 1 | 1.01 min | 16.79 s | 3.61× | 0.9 → 0.9 GB | — | pass |
gastrulation_ood_large | ood_large | macOS | 1 | 4.12 min | 1.14 min | 3.60× | 1.8 → 1.4 GB | — | pass |
gastrulation_ood_xlarge | ood_xlarge | macOS | 1 | 19.49 min | 3.30 min | 5.91× | 2.7 → 1.9 GB | — | pass |
pbmc200k_glaucoma_large | large | macOS | 1 | 7.12 min | 1.32 min | 5.41× | 1.8 → 1.4 GB | — | pass |
pbmc68k_medium | medium | macOS | 1 | 3.72 min | 56.11 s | 3.98× | 1.6 → 1.2 GB | — | pass |
pbmc68k_tiny | small | macOS | 1 | 59.82 s | 6.67 s | 8.96× | 1.2 → 0.9 GB | — | pass |
Frequently asked questions
Why is Slingshot slow?
Slingshot is CPU-bound, and the stock implementation in slingshot leaves performance on the table in its core numerical work. On the benchmark datasets the original takes 1.01 min where the AutoZyme path takes 16.79 s (3.61× faster).
How do I make Slingshot faster?
Install AutoZyme and activate the slingshot patch, then keep using Slingshot exactly as before. AutoZyme transparently substitutes the faster, output-validated path, up to 3.61× faster on the benchmark datasets, with no pipeline or API changes.
Does the AutoZyme speedup change the Slingshot output?
Differences are small and bounded: concordance-validated to within roughly 1.5 to 5% of the original slingshot result on every benchmark dataset, inside a frozen gate.
How do I install the slingshot speedup?
In R: install the autozyme package, then run library(autozyme) and autozyme::activate("slingshot"). The patch applies automatically the next time you call slingshot::slingshot.