17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

325 make-hash-table<br />

make-hash-table takes the following keyword arguments:<br />

:test<br />

:size<br />

:area<br />

One of the values #'eq, #'eql, or #'equal; one of the<br />

predicates eq, eqI, equal; or some arbitrary predicate<br />

that you specify. It determines how keys are compared.<br />

An integer representing the initial size of the table.<br />

If :area is nil (the default), the sys:default-cons-area is<br />

used. Otherwise, the number of the area that you wish<br />

to use. This keyword is a Symbolics extension to Common<br />

Lisp.<br />

: hash-function Specifies a replacement hashing function. The default is<br />

based on the :test predicate. This keyword is a Symbolics<br />

extension to Common Lisp.<br />

:rehash-before-cold<br />

Causes a rehash whenever the hashing algorithm has<br />

been invalidated. (This is part of the before-cold<br />

initializations.) Thus every user of the saved band does<br />

not have to waste the overhead of rehashing the first<br />

time they use the table after cold booting.<br />

For eq tables, hashing is invalidated whenever garbage<br />

collection or band compression occurs because the hash<br />

function is sensitive to addresses of objects, and those<br />

operations move objects to different addresses. For<br />

equal tables, the hash function is not sensitive to addresses<br />

of objects that smash knows how to hash but it<br />

is sensitive to addresses of other objects. The table<br />

remembers whether it contains any such objects.<br />

Normally a table is automatically rehashed "on demand"<br />

the first time it is used after hashing has become invalidated.<br />

This first gethash operation is therefore<br />

much slower than normal.<br />

The :rehash-before-cold keyword should be used on<br />

tables that are a permanent part of your world, likely to<br />

be saved in a band saved by <strong>zl</strong>:disk-save, and to be<br />

touched by users of that band. This applies both to<br />

tables in Genera and to tables in user-written subsystems<br />

that are saved on disk bands.<br />

This keyword is a Symbolics extension to Common Lisp.<br />

:rehash-after-full-gc<br />

: entry-size<br />

Similar to :rehash-before-cold. Causes a rehash whenever<br />

the garbage collector performs a full gc. This<br />

keyword is a Symbolics extension to Common Lisp.<br />

An integer that determines how large each entry is.<br />

Especially useful for tables of type set. Currently the<br />

I

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!