pub fn diff_piece_trees(
before: &Arc<PieceTreeNode>,
after: &Arc<PieceTreeNode>,
) -> PieceTreeDiffExpand description
Compute a diff between two piece tree roots.
Uses structural sharing (Arc::ptr_eq) to skip identical subtrees in O(1), falling back to leaf-level comparison only for subtrees that actually differ. After path-copying edits, this is O(changed_path) instead of O(all_leaves).