cvs commit: src/lib/libc/stdlib malloc.c

Andrey Chernov ache at FreeBSD.ORG
Thu Jan 26 19:21:56 PST 2006


On Thu, Jan 26, 2006 at 07:02:17PM -0800, Jason Evans wrote:
> Unfortunately, run-time checks for the debugging features are  
> expensive, since the debugging code is scattered throughout  
> malloc.c.  This pretty much mandates compile-time configuration, for  
> performance reasons.

Checking one integer many times is definitely not so expensive, as 
following many debugging asserts and even mutex locks I see in statistics 
code. 
I mean 
if (debug) {...lots of asserts...} and if (statistic) {..even locks...}
Even most of single line statistic assignments are more complex than 
checking integer, because of struct/array indexes calculation.

> consensus to do so.  How much performance difference is the debug/ 
> stats code making for you?  I've only been disabling debug/stats for  
> benchmarking purposes, so I don't have a good feel for how much it  
> impacts overall system performance.

I can't run benchmark right now, but last time I see, I feel slowdown. 
Perhaps human error, can't tell for sure right now.

-- 
http://ache.pp.ru/


More information about the cvs-all mailing list