This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (debug-enable 'debug) makes evaluator slow?


Mikael Djurfeldt <mdj@nada.kth.se> writes:

> There is no way that the debug evaluator could be faster, since it
> is generated from the same source as the normal one, with a few
> additions.

This belongs to the category of statements that you should never
make.  :)

I just realized one way in which the debug evaluator could be slightly
faster: I've noticed that the evaluator performane varies wildly
during development.  When you add a new function to eval.c, this can
either speed up the evaluator or slow it down.  I've guessed that this
is due to interference with the cache and MMU algorithm.  When code is
pushed around in eval.c, some critical part of the evaluator can land
over a page border resulting in bad performance.  More pushing around
fixes this, and so forth...

Given this scenario, it is conceivable that the normal evaluator could
land over a page border, while the debug evaluator doesn't, thereby
affecting the speed ratio.  (But I don't think this could change the
ratio by a factor of 9 which would be necessary to get the effect you
have observed.)

/mdj