[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: High run time variance

From: Luca Saiu
Subject: Re: High run time variance
Date: Tue, 30 Mar 2010 17:05:09 +0200
User-agent: Mozilla-Thunderbird (X11/20091109)

Hash: SHA1

Hi Ludovic.

Ludovic Courtès wrote:
> Hello,
> Luca Saiu <address@hidden> writes:
>> The effect is much weaker in either case, when using tail-recursive
>> functions. This is interesting.
> Another guess: it could be that the non-tail-recursive version fills the
> L2 cache

In the case of fibo I'd say no, as the maximum stack depth is O(n) and
Guile reuses the same stack space over and over again.
Anyway, even if L2 were really filled, why the timing anomaly? Some
event that we don't control takes place *at process start up time*, and
deterministically determines the speed of all the repeated evaluations
taking place later, until the process dies. This thing is intriguing.

> (/sys/devices/system/cpu/cpu0/cache/index2/size says it’s 2 MiB
> on my laptop)

On my machine L2s are 6Mb, 24-way set-associative, one per pair of cores
(there are four L2 caches for eight cores (four per package: I'm
honestly not sure about chips and dies)). Anyway during the experiments
essentially only one core of eight was active.

By the way, am I the only one seeing this effect?  I'd like to try using
OProfile to exploit some hardware event counter for cache faults and the
like. I'm not expert, but I'll look into it.


- --
Luca Saiu
GNU epsilon: http://www.gnu.org/software/epsilon
Marionnet:   http://www.marionnet.org
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]