Re: [PATCH v3 3/4] unpack-trees: reduce malloc in cache-tree walk

2018-08-08 Thread Elijah Newren
On Fri, Aug 3, 2018 at 10:39 PM Nguyễn Thái Ngọc Duy wrote: > > This is a micro optimization that probably only shines on repos with > deep directory structure. Instead of allocating and freeing a new > cache_entry in every iteration, we reuse the last one and only update > the parts that are new

[PATCH v3 3/4] unpack-trees: reduce malloc in cache-tree walk

2018-08-03 Thread Nguyễn Thái Ngọc Duy
This is a micro optimization that probably only shines on repos with deep directory structure. Instead of allocating and freeing a new cache_entry in every iteration, we reuse the last one and only update the parts that are new each iteration. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: