No description
Find a file
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
bin Updated .gitignore 2011-09-04 06:04:00 -07:00
include/tvm Hash table: implement load factor / rehash 2012-01-19 17:22:41 -05:00
lib Updated .gitignore 2011-09-04 06:04:00 -07:00
libtvm Hash table: implement load factor / rehash 2012-01-19 17:22:41 -05:00
programs Add recursive factorial 2011-10-07 17:55:18 -04:00
src Created src directory 2011-11-15 05:17:41 -07:00
tdb Improve, debug, document tdb 2011-12-07 15:55:22 -05:00
.gitignore Updated .gitignore 2011-09-04 06:04:00 -07:00
GNUmakefile Created src directory 2011-11-15 05:17:41 -07:00
README * Rename BSD make incompatible Makefile to GNUmakefile 2011-08-16 11:33:24 -04:00
SYNTAX Update register documentation 2011-09-06 20:04:38 -04:00

TinyVM is a virtual machine where the goal is having a small footprint.
Low memory usage, a small amount of code, and a small binary. This
virtual machine has been branched into several other projects, including
FastVM and SimpleVM, where performance and simplicity are the main goals 
respectively.

TinyVM and all of its branches have differing goals, but they're each designed
to execute the same code. FastVM may have better performance than TinyVM and SimpleVM,
but it may also use more memory, more complex code, and take longer to compile. TinyVM
may be smaller, and have a lighter footprint than the other branches, but it doesn't have
the speed or simplicity of the other two. TVM code is made to be portable across these 
virtual machines, but there are tradeoffs to the VM you use to execute your code.

Building can be accomplished on UNIX-like systems with make and GCC.

There are no external dependencies, save the C standard library.

Building can be accomplished using "make," or "make rebuild".

To build a debug version, add "DEBUG=yes" after "make". To build a binary with
profiling enabled, add "PROFILE=yes" after "make".