Commits
Click on a commit to change the comparison rangeperf(allocator): add #[cold] annotations to error handling functions
Mark error/panic functions as `#[cold]` to improve branch prediction
and code layout for hot paths.
Functions annotated:
- `allocation_size_overflow` in bump.rs
- `new_layout_err` in bumpalo_alloc.rs
- `handle_alloc_error` in bumpalo_alloc.rs
- `capacity_overflow` in raw_vec.rs
The `#[cold]` attribute tells the compiler to:
1. Assume branches leading to these functions are unlikely
2. Move cold code away from hot paths (improves i-cache)
3. Avoid inlining cold functions into hot callers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>