Fascinating, I had no idea that implementing copy-on-write has such different performance characteristics in C++ and Rust. A very nuanced essay, too – it skilfully mixes quantitative and deductive reasoning, and highlights simultaneous truths rather than forcing false choices or rankings.
The buried lede: Rust’s
std::borrow::Cow
is faster than the old C++ copy-on-writestring
class because it doesn’t require atomic ops.Fascinating, I had no idea that implementing copy-on-write has such different performance characteristics in C++ and Rust. A very nuanced essay, too – it skilfully mixes quantitative and deductive reasoning, and highlights simultaneous truths rather than forcing false choices or rankings.