1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-04-21 12:27:27 +03:00

qpkg: converted dumb binary trees to red-black trees (in progress)

This is a change of the underlying mechanism but it's not polished or
optimized yet. The compare functions haven't been updated, so they work
but produce compiler warnings because of type mismatches.

- Makefile (OBJS): added jrb.o
- id.h, id.c: use jrb instead of own dumb binary trees
- TODO: brag about the efficiency improvement
This commit is contained in:
Werner Almesberger
2010-11-19 21:17:08 -03:00
parent a8ed4dcb23
commit e1814ce372
4 changed files with 23 additions and 74 deletions

View File

@@ -8,6 +8,10 @@
So the tree is clearly degenerated.
Update: after switching to red-black trees, we get only 1497604 calls
to comp_id. This is 130% of the "good case" estimate above. Insertion
of a new node is currently done with two lookup, so we'll get rid of
some more lookups after further optimization.
- check whether introducing a new package would cause a conflict