darcs patch: Don't charge for int2Word# and word2Int# --
theydon't...
Simon Marlow
simonmarhaskell at gmail.com
Tue Nov 7 05:28:26 EST 2006
Bulat Ziganshin wrote:
> Hello Simon,
>
> Monday, November 6, 2006, 1:54:44 PM, you wrote:
>
>
>>I find the instruction counts and memory read/write counts from cachegrind are
>>good things to compare, as a slightly more sensitive, but still deterministic,
>>alternative to allocations. Caveats apply of course - these figures are not
>>always a good indicator for real world performance, but they are still a useful
>>tool if you bear this in mind.
>
>
> if this tool can do CPU cache modelling while counting memory
> accesses, it may become rather exact measure. it should just check
> that memory access is to same memory row (16/32) bytes that is among,
> say, last 256kb accessed
Unfortunately, cachegrind turns out not to be as useful as it sounds for cache
simulation. The problem is that to do a good job of cache simulation you have
to do a pretty sophisticated simulation of the CPU itself, knowing when the CPU
will speculatively execute code, for example. I believe there are lots of
interesting details in Nick Nethercote's thesis (he's the author of cachegrind
and did some investigation of GHC's cache behaviour a while back).
Cheers,
Simon
More information about the Cvs-ghc
mailing list