bug-grep
[Top][All Lists]
Advanced

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

Re: src/kwset.c (kwsprep): Avoid copying altogether when kwset->trans is


From: Julian Foad
Subject: Re: src/kwset.c (kwsprep): Avoid copying altogether when kwset->trans is NULL
Date: Mon, 04 Jul 2005 19:59:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217

Charles Levert wrote:
Proposed patch; I'll write a ChangeLog entry if
it's accepted.

(Grumble, grumble...)

By defining delta and next as pointers to
arrays, we can avoid copying by not having an
intermediate array when kwset->trans is NULL.

There may be a downside in using a variable
pointer instead of an array name (which is
equivalent to a constant pointer) when first
writing to the region to which it points.
I haven't benchmarked to check, and I wouldn't
have access to a variety of architectures on
which to do so anyway.

What do you think?

I can't see any particular problem with it, but I think you should avoid making this sort of speculative optimisation at the moment unless you can demonstrate a clear improvement resulting from it. In my opinion we really should be concentrating on bug fixes and any structural changes that are necessary to make some bug fixes feasible.

- Julian





reply via email to

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