Closed stannous closed 1 year ago
You're using an eq-hashtable, so the keys must compare equal with eq?. 2^63 is too large to be a fixnum, so it's allocated on the heap and should be compared with eqv?.
In short, use make-eqv-hashtable instead.
Alternatively, if all of your keys are exact nonnegative integers, using (make-hashtable values =) would be more efficient.
Thanks, Kent and Bob.
Is there a reason why I cannot use 2^63 as a key to my hashtable? (I need these for my bitboard based chess engine).
Thanks,
$ chez Chez Scheme Version 9.5.8 Copyright 1984-2022 Cisco Systems, Inc.