Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

review: print the real median, regenerate the scorecard

ebosido444-ai4c9626167aaa
diff --git a/crates/algo/examples/bench_filters2.rs b/crates/algo/examples/bench_filters2.rs
index 3791e7be6..f6b34aca2 100644
--- a/crates/algo/examples/bench_filters2.rs
+++ b/crates/algo/examples/bench_filters2.rs
@@ -94,8 +94,13 @@ fn main() {
samples.push(ms);
drop(out);
}
- let last = samples.last().copied().unwrap_or_default();
- println!("{name:<18} {w}x{h} RGBA8: {last:.1} ms{reps_note}", reps_note = if reps > 1 { format!(" (median of {reps})") } else { String::new() });
+ let mut sorted = samples.clone();
+ sorted.sort_by(f64::total_cmp);
+ let median = match sorted.len() % 2 {
+ 1 => sorted[sorted.len() / 2],
+ _ => (sorted[sorted.len() / 2 - 1] + sorted[sorted.len() / 2]) / 2.0,
+ };
+ println!("{name:<18} {w}x{h} RGBA8: {median:.1} ms{reps_note}", reps_note = if reps > 1 { format!(" (median of {reps})") } else { String::new() });
rows.push((name, samples));
}
if let Some(path) = value("--json") {
diff --git a/docs/scorecard.md b/docs/scorecard.md
index 9fd35b7e2..ccae6a52e 100644
--- a/docs/scorecard.md
+++ b/docs/scorecard.md
@@ -6,7 +6,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js
| Area | Done | Partial | Missing | Key numbers |
|---|---:|---:|---:|---|
-| [Performance](#performance) | 3 | 22 | 26 | 60 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 22 not run, 4 not measurable yet (baseline 2026-10-05) |
+| [Performance](#performance) | 3 | 22 | 30 | 64 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 26 not run, 4 not measurable yet (baseline 2026-10-05) |
| [File compatibility](#file-compatibility) | 9 | 12 | 6 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 188/256, round trip ≥ 258/256 |
| [Tools](#tools) | 36 | 8 | 0 | |
| [Workspace and UI](#workspace-and-ui) | 14 | 6 | 3 | settings that do nothing: 24 of 171 (target 0) |
@@ -80,6 +80,10 @@ Baseline: 2026-10-05, commit `f5d2bcb54a`, Apple M4 Pro (48 GB), GPU Apple M4 Pr
| P60 | Layer opacity among 150 full-canvas layers, 6 MP (app GPU budget) | ≤ 30 ms p95 | – | – | – | – | – | not run | [#5973](https://github.com/storytold/photocraft/issues/5973) |
| P61 | Hide a layer among 150 full-canvas layers, 6 MP (app GPU budget) | ≤ 30 ms p95 | – | – | – | – | – | not run | [#5973](https://github.com/storytold/photocraft/issues/5973) |
| P62 | File > New 10 x 5 m at 200 ppi (3.1 GP) + first reduced canvas refresh | track only | – | – | – | – | – | not run | [#4017](https://github.com/storytold/photocraft/issues/4017) |
+| P64 | Oil Paint on 24 MP | ≤ 1000 ms p95 | – | – | – | – | – | not run | [#211](https://github.com/storytold/photocraft/issues/211) |
+| P65 | Smart Blur r 12 on 24 MP (High quality) | ≤ 1000 ms p95 | – | – | – | – | – | not run | [#211](https://github.com/storytold/photocraft/issues/211) |
+| P66 | Relight on 24 MP | ≤ 1000 ms p95 | – | – | – | – | – | not run | [#211](https://github.com/storytold/photocraft/issues/211) |
+| P67 | Reduce Noise on 24 MP | ≤ 1000 ms p95 | – | – | – | – | – | not run | [#211](https://github.com/storytold/photocraft/issues/211) |
**Not measurable yet** (the code can't do it yet; no number is recorded):