Author: Frank Schneider
Date: 23:45:21 12/03/98
Go up one level in this thread
On December 03, 1998 at 00:10:54, Robert Hyatt wrote: >On December 02, 1998 at 22:27:27, Bruce Moreland wrote: > >> >>On December 02, 1998 at 14:30:59, Tom Kerrigan wrote: >> >>>You're right, if other people are running faster with chars, then the statement >>>I made was wrong. >>> >>>I tested this with my own program, and moving from chars to ints for a few >>>critical arrays sped up the program by more than 5%. Maybe I'm the exception to >>>the rule. >> >>Could be, that's data too. Another argument for trying it. >> >>I think it is possible that either could be better in specific situations. >> >>The chars are smaller which may have some influence on cache behavior, and the >>ints are bite-sized as far as the processor is concerned, so it doesn't have to >>mess around with clearing the top-most bits. >> >>bruce > > >There's two other explanations too. > >(1) changing the size of the board caused something *else* to become better >aligned on a cache boundary. IE the famous case where you can delete an unused >variable declaration and your program slows down or speeds up. > Just one example: I once removed a FIXED16 from a struct (about >100byes large) and the program sped up by 5%. >(2) the famous direct-mapped L2 cache problem where even the same program can >vary in NPS significantly due to the real memory pages it occupies not mapping >into the L2 cache very efficiently sometimes... > >Both are a pain. I also made another observation, but I'm not sure if it is nonsense. The speed of the program seems to depend on the ordering of the list of objectfiles the linker gets. Could that be a cache-prefetch related effect? Frank
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.