guile-devel
[Top][All Lists]
Advanced

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

Re: marking overhead, and on the cost of conditionals in hot code


From: Han-Wen Nienhuys
Subject: Re: marking overhead, and on the cost of conditionals in hot code
Date: Mon, 19 Jan 2009 01:35:53 -0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

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 - address@hidden - http://www.xs4all.nl/~hanwen





reply via email to

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