tinyvm/libtvm
Bl0ckeduser bc882e4db3 Hash table: implement load factor / rehash
Based on suggestion from bitbckt:

I  saw  this  in  my feed, and feel it merits comment. I hope you
don't mind the input.

You'll want to monitor the load factor of the hash table and  re-
hash  the  table  on  insert  when it is exceeded. Otherwise, key
lookup will degrade toward linear time for sets of  keys  with  a
high number of collisions.

The  easiest  way  to  implement the load factor is to maintain a
count of allocated nodes in tvm_htab_t and  divide  that  by  the
bucket count to obtain the load factor. Of course, you'd need the
bucket count (HTAB_SIZE) to be dynamic, too.
2012-01-19 17:22:41 -05:00
..
.gitignore Updated .gitignore 2011-09-04 06:04:00 -07:00
tvm.c Fixed comment mix up 2011-10-07 13:14:47 -07:00
tvm_file.c Implement buffer size limit in tvm_fcopy 2011-11-20 21:36:36 -05:00
tvm_hashtab.c Hash table: implement load factor / rehash 2012-01-19 17:22:41 -05:00
tvm_lexer.c changed lexer tab characters to use an escaped tab (\t) 2012-01-16 02:05:04 +00:00
tvm_memory.c Added eight more general purpose registers (r08 - r15) 2011-08-27 13:00:01 -07:00
tvm_program.c Moved memory allocation for new instructions into tvm_program.c, parse_instructions() 2011-09-26 03:09:15 -07:00
tvm_stack.c * Moved TVM code to an independent library 2011-08-26 15:30:24 -07:00