HomeFreeBSD

fls() should find the most significant bit of an int faster than a

Description

fls() should find the most significant bit of an int faster than a
linear search can, so use it to avoid a linear search in isqrt.

Approved by: kib (mentor), markj (mentor)
Differential Revision: https://reviews.freebsd.org/D20102

Details

Provenance
dougmAuthored on
Differential Revision
D20102: Use fls to avoid a loop in isqrt
Parents
rS347042: MFC: r346423
Branches
Unknown
Tags
Unknown