
Web Engineering •
Rust dyn Trait vs generics: how to switch, and the 16-byte cost
Rust dyn Trait vs generics: how to switch, and the 16-byte fat-pointer cost dyn Trait pays on every call — the cost generics compile away.
8 min read
Read more →
Rust dyn Trait vs generics: how to switch, and the 16-byte fat-pointer cost dyn Trait pays on every call — the cost generics compile away.

How to reduce Rust struct memory footprint: the 5 layout changes that shrank a real cache entry from 953 to 420 bytes, and what each one costs.

Rust GPU offload now works without unsafe code. Real benchmarks: 11% faster to 46% slower than CUDA on an H100, and a transfer bug that costs 400x more.