screen-clone was 2.6x slower than Zig. The main cost was in PageList::clone_range: it created a throwaway page, recycled it into the pool and Page::reinit then memset the entire page again, faulting in every cell. Untouched pages now go to a clean_pool that create_node reuses without re-zeroing. Page::init allocates cells with bytemuck::allocation::try_zeroed_vec (Cell derives Zeroable), getting lazily-zeroed memory from the allocator without unsafe code, and clone_partial_row_from bulk-copies plain-cell runs in rows with managed memory. screen-clone clone: 78 ms -> ~28 ms (Zig ~27.8 ms). osc::Parser::next_slice appends payload bytes in bulk while behaving exactly like per-byte next() (2048 limit, overflow), verified by a property test; the osc-parser bench uses it (54.5 -> ~32 ms, Zig ~28). Still slower: screen-clone render (~2.4x), dominated by per-row style vectors in RenderState::update. Test Plan: - cargo test --workspace (no failures) - ghostty-bench +screen-clone / +osc-parser with --profile production
25 lines
551 B
TOML
25 lines
551 B
TOML
[package]
|
|
name = "ghostty-terminal"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
bytemuck = { version = "1.25.2", features = ["derive", "extern_crate_alloc"] }
|
|
crossbeam-channel = "0.5.17"
|
|
flate2 = "1.1.10"
|
|
ghostty-datastruct.workspace = true
|
|
ghostty-unicode.workspace = true
|
|
ghostty-vt.workspace = true
|
|
log = "0.4.34"
|
|
onig = "6.5.3"
|
|
png = "0.18.1"
|
|
rustix = { version = "1.1.5", features = ["shm", "fs"] }
|
|
thiserror = "2.0.21"
|
|
|
|
[dev-dependencies]
|
|
ghostty-config.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|