]> granicus.if.org Git - apache/commit
Add a couple of optimizations to the priority queue code:
authorCliff Woolley <jwoolley@apache.org>
Wed, 17 Jul 2002 00:01:03 +0000 (00:01 +0000)
committerCliff Woolley <jwoolley@apache.org>
Wed, 17 Jul 2002 00:01:03 +0000 (00:01 +0000)
commit787d4cbd86dbb0b1632e3bc134fdd96481d58a5b
treeefcd4b54f1165107b386a6399c7958bdd9a2c048
parentbb1efcfb7fdef43dc4026130ba63eab1e9d86b97
Add a couple of optimizations to the priority queue code:

 * bubble_up and percolate_down do not need to do "swaps" -- they can just
   shift the existing items and reinsert the moving item once at the end
 * minchild() did not need that for loop -- a node can only ever have at
   most two children, and they are guaranteed to be adjacent

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96089 13f79535-47bb-0310-9956-ffa450edef68
modules/experimental/cache_pqueue.c