Page MenuHomeFreeBSD

roundup_pow_of_two: don't take the log of it
ClosedPublic

Authored by dougm on Sep 28 2024, 12:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 12, 9:28 PM
Unknown Object (File)
Sun, Jul 6, 9:21 AM
Unknown Object (File)
Jul 3 2025, 6:41 AM
Unknown Object (File)
Jul 1 2025, 9:38 AM
Unknown Object (File)
Jun 28 2025, 7:14 AM
Unknown Object (File)
Jun 25 2025, 1:08 AM
Unknown Object (File)
Jun 24 2025, 5:54 AM
Unknown Object (File)
May 1 2025, 8:27 AM
Subscribers

Details

Summary

Based on the definitions, ilog2(roundup_pow_of_two(x)) == order_base_2(x). Replace the former with the latter in a few places to save a few calculations.

Diff Detail

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

Event Timeline

dougm created this revision.
bz added a subscriber: kib.

Add @kib in the hope that he's maintaining the mlx* bits these days.

This revision is now accepted and ready to land.Sep 28 2024, 11:40 AM
This revision was automatically updated to reflect the committed changes.