If they do, you can easily reduce the cache hit to ~16kB by shifting the masks. You need 5 bits for a mask index and six bits shift count for each mask so you could fit each entry in 4 bytes. Also less than half the entries will ever be accessed which should reduce cache pressure. With some clever bit-twiddling you could calculate the masks on the fly and reduce cache pressure to almost nothing.Fulvio wrote:ASCII conversion takes 12,69% of the time and fwrite 8,47%.jwes wrote:I think after this, you would need to look at ASCII conversion and overlapped I/O to speed it up significantly.
Thanks for your suggestions, I will test them.
However the atks array will be very huge: 20 bytes * 64 * 64 = 80kB
I suspect that all the cache misses will hurt performance.
Algorithm for mate recognition
Moderators: hgm, Rebel, chrisw
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am