summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-10 07:54:15 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-10 07:54:15 +0000
commit20cc60ca8fda60a3d4751022a0267b55ab6b58a3 (patch)
tree1bb48d975d07eb51243059b77ff4e9d71cc720b6 /sys
parentc415e1e1052a8b85594de4158a4cfcd651c55cda (diff)
Optimization, no functional change:
Save a cookie pointing to the very first entry in the DIR.dd_buf cache buffer and use that to speed up seekdir(3) when rewinding to that first entry. No libc bump because DIR is an opaque struct. When the optimization applies, which in particular it always does for rewinddir(3) after reading less than about 500 entries, seekdir(3) execution time drops from 100 to 0.05 milliseconds on my i386 notebook. Other cases are not slowed down. Based on an idea from and ok by guenther@.
Diffstat (limited to 'sys')
0 files changed, 0 insertions, 0 deletions