diff options
author | alc <alc@FreeBSD.org> | 2013-03-17 16:23:19 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-03-17 16:23:19 +0000 |
commit | 9e48bd7ba9216c10792b9ae08750e8482663e32c (patch) | |
tree | 0bcf12f58f2eb34e1f1c5bda8e8555ed5cd734ee /lib/libc/string/strcasecmp.c | |
parent | b346e448af4fd8a3d9a582e850a73123d59e467f (diff) | |
download | FreeBSD-src-9e48bd7ba9216c10792b9ae08750e8482663e32c.zip FreeBSD-src-9e48bd7ba9216c10792b9ae08750e8482663e32c.tar.gz |
Most allocation of pages to objects proceeds from lower to higher
indices. Consequentially, vm_page_insert() should use
vm_radix_lookup_le() instead of vm_radix_lookup_ge(). Here's why. In
the expected case, vm_radix_lookup_le() will quickly find a page less
than the specified key at the same radix node. In contrast,
vm_radix_lookup_ge() is expected to return NULL, but to do that it must
examine every slot in the radix tree that is greater than the key.
Prior to this change, the average cost of a vm_page_insert() call on my
test machine was 992 cycles. After this change, the average cost is only
532 cycles, a reduction of 46%.
Reviewed by: attilio
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/string/strcasecmp.c')
0 files changed, 0 insertions, 0 deletions