Optimization opportunities
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
This issue tracks potential opportunities for optimization.
- [ ] Per @djkoloski in https://github.com/google/zerocopy/pull/126#discussion_r1018515372, consider modifying the following:
https://github.com/google/zerocopy/blob/8201cbf936abc164add32b33e11fae125294c0ff/src/lib.rs#L2048
> NB: This can just be `t.addr() & (mem::align_of::() - 1) == 0`. If you want to micro-optimize (you might not) then that might give slightly better codegen since we know `mem::align_of` always returns a power of two.
- [ ] https://github.com/google/zerocopy/issues/202
- [ ] Use "likely" hint to compiler in situations [like this one](https://github.com/google/zerocopy/pull/317#discussion_r1315861422)
Contributor guide
Assessment
This issue has not been assessed yet.