author | Nicolas Pitre <nico@cam.org> | |
Mon, 26 Feb 2007 19:55:55 +0000 (14:55 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Feb 2007 09:34:21 +0000 (01:34 -0800) | ||
commit | d65a16f6c45c9b2a16f3abc45f727dc6507c853d | |
tree | 8c702a3bda3f9b43a8c2da46ca5e0f5f90bf5395 | tree | snapshot |
parent | 4e4b55dd0f5b4644767265f7c16a8b370278ce56 | commit | diff |
sha1_file.c: cleanup hdr usage
Let's have hdr be a simple char pointer/array when possible, and let's
reduce its storage to 32 bytes. Especially for sha1_loose_object_info()
where 128 bytes is way excessive and wastes extra CPU cycles inflating.
The object type is already restricted to 10 bytes in parse_sha1_header()
and the size, even if it is 64 bits, will fit in 20 decimal numbers. So
32 bytes is plenty.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Let's have hdr be a simple char pointer/array when possible, and let's
reduce its storage to 32 bytes. Especially for sha1_loose_object_info()
where 128 bytes is way excessive and wastes extra CPU cycles inflating.
The object type is already restricted to 10 bytes in parse_sha1_header()
and the size, even if it is 64 bits, will fit in 20 decimal numbers. So
32 bytes is plenty.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |