optimizing the cache
linas at austin.ibm.com
Mon Jan 30 20:57:45 CET 2006
On Mon, Jan 30, 2006 at 11:39:15AM +0100, Bernhard Helmes was heard to remark:
> I would like to store some variables in the cache of the prozessor and not
> in the Ram. Is there a possibility to say to gmp or / and gcc where it
> stores the variables. I hope that i can speed up the program by a factor 20.
CPU design is more subtle than that. The way to keep things in cache is
to keep them hot. Pinning something cold in the cache would most likely
result in cache contention in other parts of the program, thus degrading
performance. Note also, TLB reload and contention is important too.
More information about the gmp-discuss