Author: Gerd Isenberg
Date: 15:03:30 08/26/03
Go up one level in this thread
On August 26, 2003 at 17:21:59, Dieter Buerssner wrote: >On August 26, 2003 at 16:51:09, Gerd Isenberg wrote: > >>What about to save the modulo: >> >>UINT64 keyxy = (hashcode & 0xffffffffUL) * number_of_entries; >>index = (unsigned long) (keyxy >> 32); >> >>Didn't you introduced these index trick here before? >>To do a fast 32-bit*32-bit = 64-bit multiplication. > >Yes, it was me. Thankfully you mentioned it, so I would not feel to foolish to >give yet another different answer in a new post :-) oups, sorry for my awkwardness. May be you consider this method inferior. With modulo all 32-bits of the extracted hashkey have influence on the index. With multiply some least significant bits in hashkey are not relevant. No idea what does it mean for a "almost uniformly distribution". > >One should perhaps check the assembler output, and might need to add a cast to >convince the compiler to produce good code (so that it sees, that really that >32*32-bit -> 64-bit multiplication is needed). Yes - index directly in edx. > >Regards, >Dieter Regards, Gerd
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.