HomeFreeBSD

imgact_elf: Optimize pagesizes[] loop

Description

imgact_elf: Optimize pagesizes[] loop

Except for elements whose value is zero, the elements of pagesizes[] are
always sorted in increasing order, so once a loop starting from the end
of the array has found a non-zero element, it has found the largest
valued element and can stop iterating.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46215

Details

Provenance
alcAuthored on Jul 15 2024, 6:02 AM
Reviewer
kib
Differential Revision
D46215: imgact_elf: Optimize pagesizes[] loop
Parents
rGf6ed52c1f010: vm: Stop reducing vm_pageout_page_count at startup
Branches
Unknown
Tags
Unknown