From: Jeff King Date: Wed, 19 Apr 2017 01:32:15 GMT Subject: Re: [PATCH v1] diffcore-rename: speed up register_rename_src Message-ID: <20170419013214.q35jarvmk5jhqdyi@sigill.intra.peff.net> In-Reply-To: <20170418194421.22453-2-git@jeffhostetler.com> On Tue, Apr 18, 2017 at 07:44:21PM +0000, git@jeffhostetler.com wrote: > From: Jeff Hostetler > > Teach register_rename_src() to see if new file pair > can simply be appended to the rename_src[] array before > performing the binary search to find the proper insertion > point. I guess your perf results show some minor improvement. But I suspect this is because your synthetic repo does not resemble the real world very much. You're saving a few strcmps, but for each of those files you're potentially going to have actually zlib inflate the object contents and do similarity analysis. So "absurd number of files doing 100% exact renames" is the absolute best case, and it saves a few percent. I dunno. It is not that much code _here_, but I'm not excited about the prospect of sprinkling this same "check the last one" optimization all over the code base. I wonder if there's some way to generalize it. -Peff