№8
Создать хэш-таблицу изначально большого размера.
(defparameter *my-hash* (make-hash-table :size 100000))
; *MY-HASH*
(hash-table-size *my-hash*)
; 100000
(time (dotimes (n 100000) (setf (gethash n *my-hash*) n)))
; Compiling LAMBDA NIL:
; Compiling Top-Level Form:
;
; Evaluation took:
; 0.04 seconds of real time
; 0.04 seconds of user run time
; 0.0 seconds of system run time
; 0 page faults and
; 0 bytes consed.
; NIL
Источник:
cl-cookbook.sourceforge.net
cl-cookbook.sourceforge.net