The maximum size of the hash table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I want to create a hash table that can store more records,
(I wonder if there is a way to store more data in a single hash table besides nested )
although I know that in actual use, I will not use such a large amount at all.
---
林: (setf *the-hash-table* (make-hash-table
; in: SETF *THE-HASH-TABLE*
; (SETF *THE-HASH-TABLE*
; (MAKE-HASH-TABLE :SIZE 100000000 :TEST #'EQUAL :REHASH-SIZE 2.0
; :REHASH-THRESHOLD 0.8 :SYNCHRONIZED T :WEAKNESS ...))
; ==>
; (SETQ *THE-HASH-TABLE*
; (MAKE-HASH-TABLE :SIZE 100000000 :TEST #'EQUAL :REHASH-SIZE 2.0
; :REHASH-THRESHOLD 0.8 :SYNCHRONIZED T :WEAKNESS ...))
;
; caught WARNING:
; undefined variable: COMMON-
;
; compilation unit finished
; Undefined variable:
; *THE-HASH-TABLE*
; caught 1 WARNING condition
#<HASH-TABLE :TEST EQUAL :COUNT 0 {1001558033}>
林: (hash-table-size *the-hash-table*)
16777216
林: (expt 2 24)
16777216
林:
---
If I mentioned a repeated or resolved problem, please send a connection and point me to the correct page; if the problem cannot be solved temporarily, it’s no big deal.
Thanks for help
The builtin hash-table can grow to contain a theoretical maximum of 2^31 entries.
At that size it would consume 56GiB of memory which is probably not the best storage choice.