Ignore:
Timestamp:
Sep 14, 2008, 6:48:21 PM (12 years ago)
Author:
gz
Message:

Implemented "nearly-lock-free" hash tables. They are created by
calling MAKE-HASH-TABLE with :LOCK-FREE t, or by setting
CCL::*LOCK-FREE-HASH-TABLE-DEFAULT* to T. There is some documentation
in a big comment in l0-hash.lisp, but basically the idea is to try to
avoid any locking in GETHASH, getting the performance equivalent to
readonly tables, at the cost of rehashing becoming more
expensive. PUTHASH should be roughly equivalent (it avoids getting a
lock, but does sync memory a few times).

So far, I've only tested them on linuxx8664, by building ccl multiple
times with *lock-free-hash-table-default* = T on, so no real
multi-threaded testing. I will now switch to the mac and try to
build and use the IDE that way.

Other changes: moved some slots from the hash table to the hash table
vector so they can all be swapped in/out all at once. Made nhash.find
return -1 when not found, also to avoid some synchronization issues.
%needs-rehashing-p now takes a hash table vector, not the hash table.
Got rid of a bunch of unused slots and constants in hash tables.

Incremented fasl version in case there are any fasdumped hash tables out there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/PPC/ppc-arch.lisp

    r8417 r10731  
    483483         (defppcsubprim .SPpoweropen-ffcall-return-registers)
    484484         (defppcsubprim .SPnmkunwind)
    485          (defppcsubprim .SPunused-6)
     485         (defppcsubprim .SPset-hash-key-conditional)
    486486         (defppcsubprim .SPunbind-interrupt-level)
    487487         (defppcsubprim .SPunbind)
Note: See TracChangeset for help on using the changeset viewer.