Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Another memory latency test (another comment) (more)

Author: Robert Hyatt

Date: 13:18:54 07/22/03

Go up one level in this thread




I tested this, and for me, with the -O flag, gcc completely tossed the
code you inserted.  IE it recognized the results were not used anywhere
farther down (because everything was local) so all the calculations were
simply stripped out.

To fix this, you have to fool the compiler into actually doing the
computations by making the values non-local.  IE just declare them
outside of the {} for the search function so that they are global
values, then the compiler is forced to do the computations since it can't
see all other functions to verify that this is still dead code.




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.