Author: Sune Fischer
Date: 05:20:35 12/05/02
Go up one level in this thread
On December 03, 2002 at 23:30:50, Russell Reagan wrote: >On December 03, 2002 at 15:50:15, Russell Reagan wrote: > >>bsf: 4.265 seconds >>LSB_64: 42.968 seconds >>LastOne(): 39.906 seconds >>FirstOne(): 55.125 seconds > >I was just fooling around and wrote this one. It finished in 41.250 seconds. hey Russell, have you tried it without the table? int high_one_c_no_table (boardmap_t _bits) { int offset; int result; result = (_bits > 0xffffffff) * 32; unsigned int bits = _bits >> result; offset = (bits > 0xffff) * 16; bits >>= offset; result += offset; offset = (bits > 0xff) * 8; bits >>= offset; result += offset; offset = (bits > 0x0f) * 4; bits >>= offset; result += offset; offset = (bits > 3) * 2; bits >>= offset; result += offset; result += (bits > 1); return result; } Twice as long, but without the table :) -S.
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.