Andy Wingo escreveu:
> I dropped into cachegrind, and it tells me thing about scm_gc_mark in a
> simple guile -c 1 run:
> 

> 
> I think that the items on the left are cycle counts, and are of relative
> importance. The => lines are the cumulative costs of the subroutines.
> 
> The salient point for me is that the scm_i_marking check slows down
> this function by about 10%! 

This can easily be remedied by splitting off the actual work into internal 
function which skips the check.  The GC module could alway call the internal 
function.

> Also, that the majority of the time in this
> function is in the SCM_GC_MARK_P line.

Well, GC_MARK_P is bit fiddling a pointer dereference, with a possible cache 
miss.

Also, the code up to that point will get executed much more often than what 
follows. 

-- 
 Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen



Reply via email to