diff options
author | Dave Watson <davejwatson@fb.com> | 2016-02-29 19:22:52 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2016-03-08 21:46:19 (GMT) |
commit | 6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9 (patch) | |
tree | 0fda8700a217e33f4244c08228f483c7f9148781 /src/ph.c | |
parent | e3998c681dec35fe0de25f693a39de6fb881134e (diff) | |
download | jemalloc-6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9.zip jemalloc-6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9.tar.gz jemalloc-6bafa6678fc36483e638f1c3a0a9bf79fb89bfc9.tar.bz2 |
Pairing heap
Initial implementation of a twopass pairing heap with aux list.
Research papers linked in comments.
Where search/nsearch/last aren't needed, this gives much faster first(),
delete(), and insert(). Insert is O(1), and first/delete don't have to
walk the whole tree.
Also tested rb_old with parent pointers - it was better than the current
rb.h for memory loads, but still much worse than a pairing heap.
An array-based heap would be much faster if everything fits in memory,
but on a cold cache it has many more memory loads for most operations.
Diffstat (limited to 'src/ph.c')
-rw-r--r-- | src/ph.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ph.c b/src/ph.c new file mode 100644 index 0000000..051a20d --- /dev/null +++ b/src/ph.c @@ -0,0 +1,2 @@ +#define JEMALLOC_PH_C_ +#include "jemalloc/internal/jemalloc_internal.h" |