From: Kirill Smelkov Date: Thu, 13 Feb 2014 13:25:24 GMT Subject: Re: [PATCH 11/11] tree-diff: reuse base str(buf) memory on sub-tree recursion Message-ID: <20140213132524.GA15450@tugrik.mns.mnsspb.ru> In-Reply-To: <645beb40c13912e87f6fe67d46af2b5e81dcaaca.1391794688.git.kirr@mns.spb.ru> On Fri, Feb 07, 2014 at 09:48:52PM +0400, Kirill Smelkov wrote: > instead of allocating it all the time for every subtree in > __diff_tree_sha1, let's allocate it once in diff_tree_sha1, and then all > callee just use it in stacking style, without memory allocations. > > This should be faster, and for me this change gives the following > slight speedups for `git log --raw --no-abbrev --no-renames` > > navy.git linux.git v3.10..v3.11 > > before 0.547s 1.791s > after 0.541s 1.777s > speedup 1.1% 0.8% The timings above was done with `git log --raw --no-abbrev --no-renames --format='%H'` ^^^^^^^^^^^^^ Please change them to correct timings: navy.git linux.git v3.10..v3.11 before 0.618s 1.903s after 0.611s 1.889s speedup 1.1% 0.7% Thanks, Kirill