Skip to contentSkip to conversation

master - [radix-tree] alternative radix-tree implementation.

PATCH Joe Thornber 1 participant 1 message Sep 11, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4d964133e267b2b501a5dcd40c30cfdcfaa5903a
Commit:        4d964133e267b2b501a5dcd40c30cfdcfaa5903a
Parent:        22a13043683a5647e8cc4e3aead911e5269ffd2f
Author:        Joe Thornber <[email protected]>
AuthorDate:    Tue Sep 11 11:11:35 2018 +0100
Committer:     Joe Thornber <[email protected]>
CommitterDate: Tue Sep 11 13:12:07 2018 +0100

[radix-tree] alternative radix-tree implementation.

Sacrifices performance for simplicity, meant only for verification of the real adaptive implementation.

---
 base/Makefile                          |    3 +
 base/data-struct/radix-tree-adaptive.c | 1262 ++++++++++++++++++++++++++++++++
 base/data-struct/radix-tree-simple.c   |  256 +++++++
 base/data-struct/radix-tree.c          | 1251 +-------------------------------
 4 files changed, 1526 insertions(+), 1246 deletions(-)
base/Makefile +3 -0
index 02c4236..1823c9b 100644
@@ -10,6 +10,9 @@
 # along with this program; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
+# Uncomment this to build the simple radix tree.  You'll need to make clean too.
+# base/data-struct/radix-tree.o: CFLAGS += -DSIMPLE_RADIX_TREE
+
 BASE_SOURCE=\
 	base/data-struct/radix-tree.c \
 	base/data-struct/hash.c \
base/data-struct/radix-tree-adaptive.c new file +1262 -0

1,262 lines not on this page · raw message

base/data-struct/radix-tree-simple.c new file +256 -0

256 lines not on this page · raw message

base/data-struct/radix-tree.c +5 -1246

1,258 lines not on this page · raw message