Page MenuHomeFreeBSD

subr_pctrie: use ilog2(x) instead of fls(x)-1
ClosedPublic

Authored by dougm on May 24 2024, 5:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2025, 5:01 AM
Unknown Object (File)
Feb 15 2025, 7:23 PM
Unknown Object (File)
Feb 15 2025, 4:04 PM
Unknown Object (File)
Feb 13 2025, 11:07 AM
Unknown Object (File)
Feb 7 2025, 2:37 AM
Unknown Object (File)
Dec 14 2024, 8:36 PM
Unknown Object (File)
Dec 4 2024, 11:35 PM
Unknown Object (File)
Nov 25 2024, 7:44 PM
Subscribers

Details

Summary

In a GENERIC-NODEBUG kernel, each instance of using ilog2 in place of fls()-1 saves about 4 amd64 instructions, including a conditional, and 16 or so bytes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable