vlist performance improvements; allocate vhash data inline
authorAndy Wingo <wingo@pobox.com>
Mon, 23 Apr 2012 19:42:40 +0000 (21:42 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 23 Apr 2012 19:52:25 +0000 (21:52 +0200)
commit4bd53c1ba39ba1c2d51ff895104f27cf4bb69e4e
tree8e4a9fa2d5679dbc34143b079d4e3935432488d8
parent985702f7131e11c7c13aa75db19d10525c34fecd
vlist performance improvements; allocate vhash data inline

* module/ice-9/vlist.scm (make-block): If we are making a hash table,
  allocate it inline with the contents.  Otherwise don't even add a
  pointer to the block.
  (block-hash-table?): New internal accessor.
  (block-ref*): Remove.  Vhash entries are no longer wrapped.
  (block-ref):
  (block-hash-table-next-offset):
  (block-hash-table-set-next-offset!):
  (block-hash-table-ref):
  (block-hash-table-set!):
  (block-hash-table-add!): Adapt to take content vector explicitly, and
  to expect the hash table inline with the contents.  Some of these
  accessors are new.  Adapt callers.
  (assert-vlist): New helper.
  (vlist-cons): Update comment.
  (vhash?): Update scheme to allocate the hash table and chain links
  inline with the contents.
  (%vhash-fold*, %vhash-assoc): Rewrite to be more performant.
module/ice-9/vlist.scm