summaryrefslogtreecommitdiff
path: root/sbin/kbd/kbd_i386.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 10:07:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-18 10:07:44 +0000
commit45f1e3b9c76b287b2e171f1215b53fdf38542f53 (patch)
treeac1641c6861da4d9a9968928384464ef7ac4ad29 /sbin/kbd/kbd_i386.c
parent9f8bd662a122167417018dc27da0bd6024c49089 (diff)
use p->hashfraction when doing non-time-critical calculations, rather than
using HASHFRACTION directly. in time-critical calculations, if HASHFRACTION is a power of two, check that p->hashfraction == HASHFRACTION and if so do the calculation with the compiled-in value so that the compiler can optimize out (potentially) expensive divisions. if p->hashfraction != HASHFRACTION, actually do the division. This has the result that on machines with slow division, the division can be optimized out of the common case, but that if HASHFRACTION changes from the compiled-in value (for whatever reason), profiling will still work. Changes suggested by Chris Torek.
Diffstat (limited to 'sbin/kbd/kbd_i386.c')
0 files changed, 0 insertions, 0 deletions