summaryrefslogtreecommitdiff
path: root/tests/diff/binary.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-05-08 17:14:59 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-05-09 09:40:29 +0200
commitb2559f477a3f8e2bc76140ca2c76d8cc30b5f5da (patch)
treea3ba6ed2cc4ed75f9411767555d71139dd8793f1 /tests/diff/binary.c
parente6d10c58b547181fe19f6bacff6bd0dee9f67b9b (diff)
downloadlibgit2-b2559f477a3f8e2bc76140ca2c76d8cc30b5f5da.tar.gz
pack: preallocate a 64-element chain
Dependency chains are often large and require a few reallocations. Allocate a 64-element chain before doing anything else to avoid allocations during the loop. This value comes from the stack-allocated one git uses. We still allocate this on the heap, but it does help performance a little bit.
Diffstat (limited to 'tests/diff/binary.c')
0 files changed, 0 insertions, 0 deletions