On Wed, Jan 16, 2013 at 9:33 AM, Junio C Hamano [off-list ref] wrote:
Duy Nguyen [off-list ref] writes:
quoted
On Wed, Jan 16, 2013 at 08:08:03AM +0700, Duy Nguyen wrote:
quoted
Actually I'd like to remove that function.
This is what I had in mind:
I think the replacement logic to find the basename is moderately
inferiour to the original. For one thing (this may be somewhat
subjective), it is less readable now.
Yeah, maybe it's micro optimization.
Also the original only
scanned the string from the beginning once (instead of letting
strlen() to scan once and go back).
But we do need to strlen() anyway in collect_all_attrs(). So we scan
the string 3 times (strlen + 2 * find_basename) in the original. Now
we do it twice
--
Duy