mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
f1602fa511
The linear search using strcmp() shows up in pmcstat for several percent. Split the operators into lengths and whether they start with '-' and compare bytes using == instead of strcmp(). A simple test sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done' is over 4% faster on an amd64 bhyve VM. |
||
---|---|---|
.. | ||
tests | ||
Makefile | ||
Makefile.depend | ||
test.1 | ||
test.c |