rope: make rope library macro template
Rope library stores alloc, split and free functions by pointer, that is a huge slog at performance, as any other virtual function call. There is no reason, why the rope library may not become a template, except historical ones. The patch not only removes virtual functions, but also makes rope deletion almost no-op in case if free() function is not defined. A second motivation point of that patch is that original rope structure was too big. Again, because it stored several pointers to functions. In forthcoming patches on #1261 multiple ropes can be created per each update, so it makes sense to reduce size of this structure.
Showing
- debian/copyright 1 addition, 1 deletiondebian/copyright
- src/box/tuple_update.c 32 additions, 42 deletionssrc/box/tuple_update.c
- src/lib/salad/rope.c 73 additions, 406 deletionssrc/lib/salad/rope.c
- src/lib/salad/rope.h 531 additions, 86 deletionssrc/lib/salad/rope.h
- test/unit/rope.c 0 additions, 1 deletiontest/unit/rope.c
- test/unit/rope_avl.c 0 additions, 1 deletiontest/unit/rope_avl.c
- test/unit/rope_basic.c 0 additions, 1 deletiontest/unit/rope_basic.c
- test/unit/rope_common.h 35 additions, 6 deletionstest/unit/rope_common.h
- test/unit/rope_stress.c 2 additions, 3 deletionstest/unit/rope_stress.c
Loading
Please register or sign in to comment