Author: Pham Minh Tri
Date: 14:18:56 11/16/00
Go up one level in this thread
>i know that the two methods are equivalent in principle, but it's a fact that >the execution speed of my program changes (not much, i admit) if i change this >statement. there is the difference pointed out by james: The second statement is little slower, isn't it? I think the reason relates to lock/unlock memory blocks. The big array in the first case is always allocated by fix memory blocks so it is the fastest. But memory blocks in the second case are not fix. They could run around and may be stored in virtual memory (saved to disk). Before any accessing this array, the program must lock them automatically (reload if they stay in disk, save other memory blocks into disk if not enough physical memory), and then unlock after use. And the pointers are also more complicated than the first case. Pham
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.