-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
This issue tracks potential opportunities for optimization.
- Per @djkoloski in Allow dereferencing an Unalign, add trait impls #126 (comment), consider modifying the following:
Line 2048 in 8201cbf
let remainder = t.addr() % mem::align_of::<U>(); NB: This can just be
t.addr() & (mem::align_of::<U>() - 1) == 0. If you want to micro-optimize (you might not) then that might give slightly better codegen since we knowmem::align_ofalways returns a power of two. - Prevent panics statically #202
- Use "likely" hint to compiler in situations like this one
Metadata
Metadata
Assignees
Labels
No labels