/* rbIntTest - Test rbIntTree. */ /* Results of this for trees of 100,000 are: * rbIntTree: 656 millis * rbTree: 795 millis * hash: 2927 millis * So in all it looks like it's not worth adding the special case * rbIntTree, especially since it's currently crashing for counts of * 200,000. It does look worthwhile to use rbTree rather than a hash * though. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "memalloc.h" #include "localmem.h" #include "rbTree.h" #include "rbIntTree.h" void usage() /* Explain usage and exit. */ { errAbort( "rbIntTest - Test rbIntTree\n" "usage:\n" " rbIntTest count\n" "options:\n" " -xxx=XXX\n" ); } static struct optionSpec options[] = { {NULL, 0}, }; void rbIntTest(int count) /* Fill up rbIntTree with count # of nodes and then search for those * nodes and then free it up. */ { int i, j; struct rbIntTree *tree = rbIntTreeNew(); struct lm *lm = tree->lm; for (i=0; ilm; for (i=0; ilm; for (i=0; i