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
Bl0ckeduser
e0a387d7de
Fix hash collisions (separate chaining)
2012-01-18 12:54:23 -05:00
Joseph
9771115a76
Merge pull request #20 from kk-/master
...
Changing actual tab characters with escaped ones
2012-01-15 22:41:10 -08:00
Kyle K
279bdc61c1
changed lexer tab characters to use an escaped tab (\t)
2012-01-16 02:05:04 +00:00
Joseph
71901e4ad5
Merge pull request #19 from bl0ckeduser/master
...
Improve tdb, add tdb/README
2011-12-08 19:14:43 -08:00
Bl0ckeduser
d6879ced11
Improve, debug, document tdb
2011-12-07 15:55:22 -05:00
Joseph
f3f917350f
Merge pull request #18 from bl0ckeduser/patch-1
...
Tweak file handling code
2011-11-20 19:51:21 -08:00
Bl0ckeduser
313a440342
Implement buffer size limit in tvm_fcopy
2011-11-20 21:36:36 -05:00
bl0ckeduser
c1d5d35c27
Shorten tvm_flength, tvm_fcopy
2011-11-20 21:10:50 -05:00
Joseph Kogut
b0847a128f
Created src directory
2011-11-15 05:17:41 -07:00
Joseph Kogut
19ec55c301
Fixed comment mix up
2011-10-07 13:14:47 -07:00
Joseph
4f4d9d1044
Merge pull request #17 from bl0ckeduser/master
...
Fix "ret" opcode crash; add recursive factorial
2011-10-07 19:27:00 -07:00
bl0ckeduser
5f669a78ce
Add recursive factorial
2011-10-07 17:55:18 -04:00
bl0ckeduser
fcd0a1f7e2
Fix bug in "ret" opcode
2011-10-07 14:38:18 -04:00
Joseph Kogut
ea610836cd
Added solution to Project Euler problem number 7
2011-10-02 18:06:47 -07:00
Joseph
a3c207d63d
Merge pull request #16 from bl0ckeduser/master
...
Prime numbers program
2011-09-28 22:05:52 -07:00
Bl0ckeduser
ba1f6ce765
Add simple prime-listing program
2011-09-28 21:25:11 -04:00
Joseph Kogut
19a48f04ee
Moved memory allocation for new instructions into tvm_program.c, parse_instructions()
2011-09-26 03:09:15 -07:00
Joseph
8cd840e1c7
Merge pull request #15 from bl0ckeduser/master
...
Quick & dirty fix for segfault
2011-09-26 09:12:20 -07:00
Bl0ckeduser
d9e3f942f5
Safety-check free()s in destroy_program
2011-09-25 15:35:03 -04:00
Joseph Kogut
72193566b9
Moved program interpretation to explicitly called function
2011-09-25 05:47:31 -07:00
Joseph Kogut
af7224085e
Merge branch 'master' of github.com:/GenTiradentes/tinyvm
2011-09-08 09:46:42 -07:00
Joseph Kogut
6fb039da4a
Refactored parsing of register tokens
2011-09-08 09:43:45 -07:00
Joseph
93adee0535
Merge pull request #14 from bl0ckeduser/master
...
Update registers documentation
2011-09-07 07:40:13 -07:00
Bl0ckeduser
5ac76ad96b
Update register documentation
2011-09-06 20:04:38 -04:00
Joseph Kogut
75edb60116
* Fixed a style issue
...
* Inlined tvm_step()
2011-09-04 18:45:56 -07:00
Joseph
d6103eba8d
Merge pull request #13 from patricksjackson/master
...
Removing redundancy
2011-09-04 17:25:17 -07:00
Patrick Jackson
68d066bd53
Removed the redundancy introduced by tdb_step.
2011-09-04 17:06:08 -04:00
Joseph Kogut
fbdfe93d9e
Updated .gitignore
2011-09-04 06:04:00 -07:00
Joseph Kogut
777d67d46a
Added uncommitted code in tdb/
2011-09-02 02:07:14 -07:00
Joseph Kogut
9de158cf42
Merge branch 'master' of github.com:GenTiradentes/tinyvm
2011-09-02 02:05:55 -07:00
Joseph Kogut
7a128d41ec
Added break and step to tdb
2011-09-02 02:05:17 -07:00
Joseph
db0f7149d2
Merge pull request #12 from bl0ckeduser/master
...
Tweak linker argument syntax
2011-08-29 20:10:34 -07:00
Bl0ckeduser
cb76fd50ce
Use alternate linker argument syntax
2011-08-29 18:43:07 -04:00
Joseph Kogut
9e112f8eaa
Added tokenization of commands to TDB
2011-08-27 13:50:24 -07:00
Joseph Kogut
ffe33f4dd8
Added TDB, a debugger for TVM
2011-08-27 13:21:03 -07:00
Joseph Kogut
baf6df7c00
Added eight more general purpose registers (r08 - r15)
2011-08-27 13:00:01 -07:00
Joseph Kogut
dd547269e9
Merge branch 'master' of github.com:GenTiradentes/tinyvm
2011-08-27 01:41:56 -07:00
Joseph Kogut
1aec8776ae
Removed CXXFLAGS from makefile, no C++ compiler is used
2011-08-27 01:41:06 -07:00
Joseph Kogut
68011826e9
Added install and uninstall build targets
2011-08-26 15:40:02 -07:00
Joseph Kogut
15019d041f
* Moved TVM code to an independent library
...
* Moved interpreter code to tvmi.c
2011-08-26 15:30:24 -07:00
Joseph Kogut
222b1d3b1e
Added comments denoting which instruction each switch statement executed
2011-08-26 14:52:29 -07:00
Joseph Kogut
61b674b267
Fixed build target "rebuild"
2011-08-26 14:36:24 -07:00
Joseph
24a36749a9
Merge pull request #11 from trbecker/master
...
Improves build rules
2011-08-26 20:42:35 -07:00
Thiago Rafael Becker
cbe668d81c
Better build rules.
2011-08-26 19:55:45 -03:00
Joseph Kogut
8562f3f9a2
* Added binary directory
...
* Added directory for tinyvm debugger
* Modified Makefile to store binaries in their own directory
* Modified Makefile to create a symlink between the binary, and the programs directory
2011-08-22 03:22:59 -07:00
Joseph
88587f00dd
Merge pull request #9 from bl0ckeduser/master
...
Small assembly optimizations
2011-08-20 18:43:30 -07:00
Bl0ckeduser
a90f98cee3
Fix euler2.vm optimization
2011-08-20 12:45:13 -04:00
Bl0ckeduser
b466c146a1
Small optimization for fib.vm
2011-08-20 12:42:18 -04:00
Bl0ckeduser
7dfca61336
Small optimization for euler2.vm
2011-08-20 12:35:23 -04:00