6.1. Reducing the Data Type Bit-Width
-
When Freecell Solver started it represented each card and stack length
specifier as a 32-bit quantity.
-
This caused it to run out of memory or stack in some cases.
-
To resolve it, I converted it to use 8-bit bytes.
-
This did not only consume less memory but also made it much faster.
-
I
queried the Linux-IL mailing-list about it and received some answers.
-
The most probable reasons: less memory -> less cache misses, and handling
bytes is just as fast as handling ints.
Written by Shlomi Fish