HomeFreeBSD

Evaluating htons() at compile time is more efficient than doing ntohs()

Description

Evaluating htons() at compile time is more efficient than doing ntohs()
at runtime. This change removes a dependency on a barrel shifter pass
before branch resolution, while reducing the instruction stream size
by 9 bytes on amd64.

(cherry picked from commit 6aee0bfa85685017dbc5050ce36793f7dcd80f82)

Details

Provenance
zecAuthored on Jun 19 2019, 8:39 AM
mavCommitted on Jan 7 2021, 5:41 PM
Parents
rGacaac0eefa1f: Ensure that dirent's d_off field is initialized
Branches
Unknown
Tags
Unknown