fitzgen / bumpalo

A fast bump allocation arena for Rust
https://docs.rs/bumpalo
Apache License 2.0
1.41k stars 111 forks source link

Add `#[inline]` annotations to all public functions #197

Closed Kmeakin closed 1 year ago

Kmeakin commented 1 year ago

Functions which are not marked #[inline] cannot be inlined when called from third-party crates without LTO enabled. This PR adds #[inline] annotations to public functions which were missing them, and adds a clippy warning to ensure future public functions are always marked #[inline]

Kmeakin commented 1 year ago

The motivation was initially to try and remove function calls from the emitted assembly to calls like Bump::new(), and Bump::alloc(), but yes I then discovered the clippy lint and applied it everywhere it suggested. I will close this issue and reopen a new one if I can find any profile differences.