apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: [PATCH] simplify apr_pools.c a little
Date Thu, 30 Oct 2003 11:30:31 GMT
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Thursday, October 30, 2003 11:32 AM

> On Wed, Oct 29, 2003 at 09:52:46PM +0000, Joe Orton wrote:
> > I wrote this when tracking down that psprintf bug, I think it makes the
> > code a little clearer than trying to follow the pointer juggling
> > everywhere.  Any objections to committing it? (object code is
> > byte-for-byte identical before and after)
> 
> +1. The ref stuff is totally opaque.

+1 for the simplification.  I should have used macros like that in the
first place.  There, committed.  Thanks Joe.

> I really don't understand the benefit of the double-indirection and the
> resulting complexity.

There are less checks to do.  Since memory allocation is one
of the core operations (in that there are so many of them), eliminating
cycles counts (IMO).  Ofcourse we'd need to do some serious profiling
to see if there is really speedup in the double-indirection.  For now,
with the new macros, the code should be readable enough not to warrant
rewrite with 'clearer', more verbose, list logic.


Sander

Mime
View raw message