Ignore:
Timestamp:
Jul 9, 2008, 2:48:15 PM (12 years ago)
Author:
gz
Message:

Faster version of mod in hashing code (based on Bruce Hoult's Dylan version, plus a branch-free max).

On the machine I'm using this seems to speed up the no-locking no-collision no-address case of EQ GETHASH by about 20%.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/xdump/hashenv.lisp

    r7959 r9930  
    3232(defconstant $nhash.lock-not-while-rehashing #x-20001)
    3333
    34 ; The hash.vector cell contains a vector with 8 longwords of overhead
     34; The hash.vector cell contains a vector with some longwords of overhead
    3535; followed by alternating keys and values.
    3636; A key of $undefined denotes an empty or deleted value
     
    4747  nhash.vector.cache-key                ; cached key
    4848  nhash.vector.cache-value              ; cached value
     49  nhash.vector.size                     ; number of entries in table
     50  nhash.vector.size-reciprocal          ; shifted reciprocal of nhash.vector.size
    4951  )
     52
    5053
    5154; number of longwords of overhead in nhash.vector.
    5255; Must be a multiple of 2 or INDEX parameters in LAP code will not be tagged as fixnums.
    53 (defconstant $nhash.vector_overhead 10)
     56(defconstant $nhash.vector_overhead 12)
    5457
    5558(defconstant $nhash_weak_bit 12)        ; weak hash table
Note: See TracChangeset for help on using the changeset viewer.