Correct.Rein Halbersma wrote:Pardon my ignorance, but your TBs still use memory-mapped I/O, correct?syzygy wrote: (What may be more efficient is using a higher probe depth for 6-piece positions than for 5-piece positions, knowing that the 5-piece positions are more likely to be cached in RAM. As it happens, this idea was already implemented in SF. But probing the same table in the leaves when it could have been done just once in a parent node is just silly.)
Yes, I have looked into those calls a while ago (I had to search for it, as I did not remember the name of the call). I thought then that it would be too expensive on every call, but still it might be worth a try.One avenue for experimentation might be to use conditional lookups after an is-in-RAM check. IIRC, at least on Linux there are OS calls to do this now.
I am also still looking for this instruction:
Alternatively, it might be useful to have an OS call to page in a block or a series of blocks in the background (basically asynchronously, but without the callback).What would be ideal is an x86-64 load instruction that would not result in a page fault if the required memory page is not in RAM, but that would set an error flag.
Or use more search threads than physical or logical cores, the idea being that there will always be some waiting for I/O so that others can search on.Another thing is to use an asynchronous queue of positions-to-be-looked-up. You could then maintain a counter per position and do conditional lookups after a position is queried for a second time etc. But maybe the OS does this more efficiently than such a scheme.
Yes, SSDs and lots of RAM are very niceAt least in draughts in the old days before SSDs and huge RAM, the search would slow down 10x when in the late middle game, e.g. 4 Gb RAM + 100 Gb TBs on disk. When RAM ~ 32Gb and using SSDs, search speed is not affected significantly.
And if some of the new memory technologies in development work out, we might at some point have terabytes of TB data accessible with the speed of RAM. And maybe TBs could be generated directly on such memories.