diff options
author | Dmitry Potapov <dpotapov@gmail.com> | 2010-02-21 09:32:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-21 11:39:10 -0800 |
commit | ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee (patch) | |
tree | 0b2e4380a4bcd4933c0f85440c033def07fc090a /compat/unsetenv.c | |
parent | Git 1.7.0 (diff) | |
download | tgif-ea68b0ce9f8ce8da3e360aed3cbd6720159ffbee.tar.xz |
hash-object: don't use mmap() for small files
Using read() instead of mmap() can be 39% speed up for 1Kb files and is
1% speed up 1Mb files. For larger files, it is better to use mmap(),
because the difference between is not significant, and when there is not
enough memory, mmap() performs much better, because it avoids swapping.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/unsetenv.c')
0 files changed, 0 insertions, 0 deletions