[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [PATCH] delta_files() speedup 2/3: keyword substitution

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 29 Mar 2010 23:38:04 +0200

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Sent: maandag 29 maart 2010 18:20
> To: Julian Foad
> Cc: Stefan Fuhrmann; dev_at_subversion.apache.org
> Subject: Re: [PATCH] delta_files() speedup 2/3: keyword substitution
>
> Julian Foad <julian.foad_at_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
Received on 2010-03-29 23:38:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.