Skip to content

Commit

Permalink
Increase max hash size to 64GB
Browse files Browse the repository at this point in the history
Now that TT cluster ize is 32bytes and
we address TT table by cluster, it is
possible to raise the limit to 64GB
while still using a uint32_t to index
the cluster within teh table.

No functional change.
  • Loading branch information
mcostalba committed Jun 28, 2014
1 parent 422532a commit be341d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ucioption.cpp
Expand Up @@ -60,7 +60,7 @@ void init(OptionsMap& o) {
o["Contempt Factor"] << Option(0, -50, 50);
o["Min Split Depth"] << Option(0, 0, 12, on_threads);
o["Threads"] << Option(1, 1, MAX_THREADS, on_threads);
o["Hash"] << Option(32, 1, 16384, on_hash_size);
o["Hash"] << Option(32, 1, 65536, on_hash_size);
o["Clear Hash"] << Option(on_clear_hash);
o["Ponder"] << Option(true);
o["MultiPV"] << Option(1, 1, 500);
Expand Down

3 comments on commit be341d2

@lucasart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of size_t is that it will be 4 bytes on 32-bit machines and 8 bytes on 64-bit machines. That way you don't have to compromise and limit the hash to 64 TB for 64-bit machines, only to preserve performance on 32-bit machines, where the & is expensive with 64-bit operands.

@mcostalba
Copy link
Owner Author

@mcostalba mcostalba commented on be341d2 Jul 6, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucasart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a 32-bit system you will fail allocating more than 4GB and SF will crash before first_entry is executed.

Please sign in to comment.