freebsd-skq/bin/test
jilles 9302898500 test: Optimize operator lookup.
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.
2016-01-30 19:59:58 +00:00
..
tests Clean up trailing whitespace 2015-10-18 05:51:44 +00:00
Makefile
Makefile.depend
test.1
test.c test: Optimize operator lookup. 2016-01-30 19:59:58 +00:00