* core: hi, everybody. this work i'm checking in surrounds the representation of...
author_why <why@whytheluckystiff.net>
Thu, 2 Jul 2009 22:01:14 +0000 (15:01 -0700)
committer_why <why@whytheluckystiff.net>
Thu, 2 Jul 2009 22:01:14 +0000 (15:01 -0700)
commitd30d68e83bf834f776e66abc4e9d20948200a9c1
treee257d7cf4c9fb2703a4696563ff9fb01fa4ae307
parentbfade6371cc17a15f21c354d2970def7dc6114d8
 * core: hi, everybody. this work i'm checking in surrounds the representation of hash tables in memory. i'm trying to squeeze down the size they take up. potion has three different types of hash tables: the basic table, the method table, and the strings table. this is the last object structure to be moved into gc (there are only two small malloc calls left in Potion.) previously, a basic hash table would take up 48 bytes of overhead on 64-bit. in addition, the table object was split into two parts: the immutable table object and a mutable table array. with this code, the table overhead is 24 bytes and the objects are combined. this means every table object is mutable and will move about in memory (like lists already do.) the total cost of a hashtable is now: 24 bytes + 4 bytes for every 16 pairs + each pair (8 bytes * 2). for comparison, a list is 16 bytes + each item (8 bytes).
core/gc.c
core/gc.h
core/khash.h
core/objmodel.c
core/potion.c
core/potion.h
core/string.c
core/table.c
core/table.h
core/vm-x86.c