subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bert Huijben" <b...@qqmail.nl>
Subject RE: [PATCH] delta_files() speedup 2/3: keyword substitution
Date Mon, 29 Mar 2010 21:38:04 GMT


> -----Original Message-----
> From: Philip Martin [mailto:philip.martin@wandisco.com]
> Sent: maandag 29 maart 2010 18:20
> To: Julian Foad
> Cc: Stefan Fuhrmann; dev@subversion.apache.org
> Subject: Re: [PATCH] delta_files() speedup 2/3: keyword substitution
> 
> Julian Foad <julian.foad@wandisco.com> writes:
> 
> >> * subversion/libsvn_subr/subst.c
> >>   (translation_baton): the 'interesting' member is now
> >>   a boolean array.
> >>   (create_translation_baton): adapt initialization code
> >>   (translate_chunk): eliminate call to strchr
> >>
> >> patch by stefanfuhrmann < at > alice-dsl.de
> >> ]]]
> >
> > This patch looks lovely, from the point of view of a read-through
> > review.
> 
> Agreed.
> 
> To get rid of the initialization we could use 4 static constant arrays
> (we could even partially overlap them to save memory), but that's
> probably not a significant improvement.

I'm not sure how all this compares to just three byte compares, but with a
only a few kb first level cache in most current x86 processors it might be
even more optimal to just do the comparison in code. 

But I think any solution that avoids calling the locale dependent strchr()
function will help here and the details between the table and in-code
variants are probably not measurable.

	Bert


Mime
View raw message