Replace placement calls with region nodes

This commit is contained in:
iris-ai committed 2026-09-15 18:02:28 -04:00
1 parent f437495309
commit 71c9c39523
23 files changed
+374 -170

No files matched your search

+3 -5
View File
@@ -1,4 +1,4 @@
//! What re-placing a subtree costs per frame, as a load for a counter rather
//! What remapping a subtree costs per frame, as a load for a counter rather
//! than a check. A span of 200 fixed-height rows, five primitives each, with
//! the row above them changing height every frame, so every row below is
//! offered a box the same shape somewhere else.
@@ -6,9 +6,7 @@
//! cargo test --release --test replace_cost -- --ignored
//! perf stat -e instructions:u target/release/.../replace_cost-* --ignored
//!
//! Wall time is the wrong number here; see `draw_cost.rs`. Measured on
//! 2026-09-14 at 1.98M instructions per frame, against 2.38M for rewriting
//! each row's regions instead and 7.13M for redrawing them.
//! Wall time is the wrong number here; see `draw_cost.rs`.
use iris::harness::Harness;
use iris::prelude::*;
@@ -18,7 +16,7 @@ const FRAMES: usize = 200;
#[test]
#[ignore = "measurement, not a check"]
fn replacing_rows_every_frame() {
fn remapping_rows_every_frame() {
let mut h = Harness::new((1920, 1200));
let first = rect(Color::RED).height(40).add(&mut h.rsc);
let mut span = Span::empty(Dir::DOWN);