diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:48 -0800 |
commit | 0f9e62e0847c075678a7a5a748567d1e881d16f8 (patch) | |
tree | 8ef8989069ae40eef891b0964fc2cb8036a74e48 /block-sha1 | |
parent | 6784fab0ac1f973f22f1d4252f0e513d61be6c6b (diff) | |
parent | 6b5b3a27b7faf9d72efec28fa017408daf45cd00 (diff) | |
download | git-0f9e62e0847c075678a7a5a748567d1e881d16f8.tar.gz |
Merge branch 'jk/pack-bitmap'
Borrow the bitmap index into packfiles from JGit to speed up
enumeration of objects involved in a commit range without having to
fully traverse the history.
* jk/pack-bitmap: (26 commits)
ewah: unconditionally ntohll ewah data
ewah: support platforms that require aligned reads
read-cache: use get_be32 instead of hand-rolled ntoh_l
block-sha1: factor out get_be and put_be wrappers
do not discard revindex when re-preparing packfiles
pack-bitmap: implement optional name_hash cache
t/perf: add tests for pack bitmaps
t: add basic bitmap functionality tests
count-objects: recognize .bitmap in garbage-checking
repack: consider bitmaps when performing repacks
repack: handle optional files created by pack-objects
repack: turn exts array into array-of-struct
repack: stop using magic number for ARRAY_SIZE(exts)
pack-objects: implement bitmap writing
rev-list: add bitmap mode to speed up object lists
pack-objects: use bitmaps when packing objects
pack-objects: split add_object_entry
pack-bitmap: add support for bitmap indexes
documentation: add documentation for the bitmap format
ewah: compressed bitmap implementation
...
Diffstat (limited to 'block-sha1')
-rw-r--r-- | block-sha1/sha1.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index e1a1eb6097..22b125cf8c 100644 --- a/block-sha1/sha1.c +++ b/block-sha1/sha1.c @@ -62,38 +62,6 @@ #define setW(x, val) (W(x) = (val)) #endif -/* - * Performance might be improved if the CPU architecture is OK with - * unaligned 32-bit loads and a fast ntohl() is available. - * Otherwise fall back to byte loads and shifts which is portable, - * and is faster on architectures with memory alignment issues. - */ - -#if defined(__i386__) || defined(__x86_64__) || \ - defined(_M_IX86) || defined(_M_X64) || \ - defined(__ppc__) || defined(__ppc64__) || \ - defined(__powerpc__) || defined(__powerpc64__) || \ - defined(__s390__) || defined(__s390x__) - -#define get_be32(p) ntohl(*(unsigned int *)(p)) -#define put_be32(p, v) do { *(unsigned int *)(p) = htonl(v); } while (0) - -#else - -#define get_be32(p) ( \ - (*((unsigned char *)(p) + 0) << 24) | \ - (*((unsigned char *)(p) + 1) << 16) | \ - (*((unsigned char *)(p) + 2) << 8) | \ - (*((unsigned char *)(p) + 3) << 0) ) -#define put_be32(p, v) do { \ - unsigned int __v = (v); \ - *((unsigned char *)(p) + 0) = __v >> 24; \ - *((unsigned char *)(p) + 1) = __v >> 16; \ - *((unsigned char *)(p) + 2) = __v >> 8; \ - *((unsigned char *)(p) + 3) = __v >> 0; } while (0) - -#endif - /* This "rolls" over the 512-bit array */ #define W(x) (array[(x)&15]) |