HomeFreeBSD

Optimize res_find().

Description

Optimize res_find().

When the device name is provided, we can simply run strncmp() for each
line to quickly skip unrelated ones, that is much faster than sscanf()
and only then strcmp().

MFC after: 2 weeks

(cherry picked from commit 696fca3fd491972e615195f2ce94598b9c469cac)

Details

Provenance
mavAuthored on Aug 9 2021, 1:34 AM
Parents
rG48edac83b3b5: sigtimedwait: Use a unique wait channel for sleeping
Branches
Unknown
Tags
Unknown