-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ludovic.
Ludovic Courtès wrote: > Hello, > > Luca Saiu <posit...@gnu.org> 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. Thanks, - -- Luca Saiu http://www-lipn.univ-paris13.fr/~saiu GNU epsilon: http://www.gnu.org/software/epsilon Marionnet: http://www.marionnet.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkuyEyUACgkQvzOavibF0oaUQgCcC4V1HQoLXYlqrzqeOuqTn2ra DJEAnRCjcLDYjqlBIlBDpIOIcPKnEyCg =sUjD -----END PGP SIGNATURE-----