<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Check the specification at <a href="http://clhs.lisp.se/Body/f_mk_has.htm" class="">http://clhs.lisp.se/Body/f_mk_has.htm</a><div class=""><br class=""></div><div class="">Specifically,</div><div class=""><p style="font-family: -webkit-standard;" class=""><i class="">size</i> is a hint to the <a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_i.htm#implementation" class=""><i class="">implementation</i></a> about how much initial space to allocate in the <i class="">hash-table</i>. This information, taken together with the <i class="">rehash-threshold</i>, controls the approximate number of entries which it should be possible to insert before the table has to grow. The actual size might be rounded up from <i class="">size</i> to the next `good' size; for example, some <a rel="DEFINITION" href="http://clhs.lisp.se/Body/26_glo_i.htm#implementation" class=""><i class="">implementations</i></a> might round to the next prime number. </p><div class="">So I’d say it is not a bug.</div><div><br class=""><blockquote type="cite" class=""><div class="">On 30 Mar 2022, at 05:34, Johnny Ruiz <<a href="mailto:jeko2000@yandex.com" class="">jeko2000@yandex.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><span style="font-size:12px;line-height:18px" class="">Hello,</span></div><div class=""> </div><div class=""><span style="font-size:12px;line-height:18px" class="">This is to report a possible bug in ABCL v1.8.0.</span></div><div class=""><span style="font-size:12px;line-height:18px" class="">When I create a new hash table and pass an initial size of a number lower then 11 (e.g., 7), the function hash-table-size reports the size as 11 instead of the provided size.</span></div><div class=""> </div><div class=""><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">$ abcl --noinit </div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">Armed Bear Common Lisp 1.8.0</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">Java 18 Homebrew</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">OpenJDK 64-Bit Server VM</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">Low-level initialization completed in 0.092 seconds.</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">Startup completed in 0.471 seconds.</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">Type ":help" for a list of available commands.</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">CL-USER(1): (defparameter *hash-table* (make-hash-table :size 7))</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">*HASH-TABLE*</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">CL-USER(2): (hash-table-size *hash-table*)</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">11</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">CL-USER(3):</div><p style="font-family:'menlo';font-size:11px;line-height:normal;margin:0px" class=""> </p><div class=""><div class=""><span style="font-size:12px;line-height:18px" class="">As long as :size is 11 or higher, then hash-table-size reports the expected size.</span></div><div class=""> </div><div class=""><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">CL-USER(3): (defparameter *larger-hash-table* (make-hash-table :size 42))</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">*LARGER-HASH-TABLE*</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">CL-USER(4): (hash-table-size *larger-hash-table*)</div><div style="font-family: menlo; font-size: 11px; line-height: normal; margin: 0px;" class="">42</div><div class=""><p style="font-family:'menlo';font-size:11px;line-height:normal;margin:0px" class=""> </p><div class=""><div class=""><span style="font-size:12px;line-height:18px" class="">Is this a known issue?</span></div><div class=""><span style="font-size:12px;line-height:18px" class="">Reference: <a href="https://github.com/jeko2000/synchronized-hash-tables/issues/3" rel="noopener noreferrer" target="_blank" class="">https://github.com/jeko2000/synchronized-hash-tables/issues/3</a></span></div><div class=""><span style="font-size:12px;line-height:18px" class="">-- </span></div><div class=""><span style="font-size:12px;line-height:18px" class="">Thank you,</span></div><div class=""><span style="font-size:12px;line-height:18px" class="">Johnny Ruiz</span></div></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>