daemon, generator: Use power of 2 for initial size of Hashtbl.create

Before 2011 it was recommended to use a prime number for the initial
size.  In 2011 the OCaml hash table was reimplemented using a hash
function based on Murmur 3.  Hashtbl.create now adjusts the initial
size to the next power of 2 (minimum 16).  So replace obsolete
'Hashtbl.create 13' with 'Hashtbl.create 16'.
This commit is contained in:
Richard W.M. Jones
2025-09-12 08:37:58 +01:00
parent 30ccb9a3e6
commit 495f71affc
6 changed files with 6 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ let setfiles_has_option =
let _, _, err = commandr "setfiles" [opt] in
String.find err err_msg = -1
in
let h = Hashtbl.create 13 in
let h = Hashtbl.create 16 in
fun flag ->
try Hashtbl.find h flag
with