Commit d8ee62b
committed
Merge branch 'kk/prio-queue-cascade-sift' into seen
prio_queue_get() has been optimized by using a cascade-down approach
(promoting the smaller child at each level and sifting up the last
element from the leaf vacancy), which halves the number of comparisons
per extract-min operation in the common case.
* kk/prio-queue-cascade-sift:
prio-queue: use cascade-down for faster extract-min1 file changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
79 | 102 | | |
80 | 103 | | |
81 | 104 | | |
| |||
89 | 112 | | |
90 | 113 | | |
91 | 114 | | |
92 | | - | |
93 | | - | |
| 115 | + | |
94 | 116 | | |
95 | 117 | | |
96 | 118 | | |
| |||
0 commit comments