Author: Russell Reagan
Date: 13:03:30 11/11/04
Go up one level in this thread
On November 11, 2004 at 15:50:49, Mathieu Pagé wrote: >On November 11, 2004 at 11:47:56, José Carlos wrote: > >>On November 11, 2004 at 09:30:05, Daniel Shawul wrote: >> >>>Today i finished organizing my BOARD class , and collecting some global >>>variables so that i can make a copy of a board easily. Problem is >>>I use 0x88 and piecelists which need huge for loops to copy. BITBOARDs look >>>easier. Is this too much of a problem? I am saying this because i think i have >>>to make a copy of the board each time a node is split. >>>daniel >> >> Maybe I misunderstood your question but... why not simply memcpy() the object? >>No loops there. >> >> José C. > >Bonjour José, > >And how do you think memcpy is copying the object ? there is nothing magic in >it. It do a loop. > >Mathieu Pagé memcpy is usually much better than a plain for loop. If it uses a loop, the loop is unrolled quite a bit, or it may be able to use specific machine instructions that do the job faster. Either way, it should be better than a plain loop. If it isn't faster, don't worry about it until it is time to optimize (i.e. after you have your program working correctly, and after you have demonstrated the need to optimize via profiling and benchmarking).
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.