Re: git-diff-tree inordinately (O(M*N)) slow on files with many changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Oct 2006, Linus Torvalds wrote:

> 
> Junio, I think this is worthy to go in before a 1.4.3 release. Possibly 
> even back-ported to earlier trees. Anything that causes an almost two 
> orders of magnitude slowdown (even if it's just on 64-bit architectures 
> and most people won't necessarily compile git that way) is worth fixing 
> pronto.

I ended up using this one:

#define XDL_HASHLONG(v, b) ((((unsigned long) (v) >> ((CHAR_BIT * sizeof(unsigned long)) - (b))) + \
                            (unsigned long) (v)) & ((1UL << (b)) - 1))

The GR_PRIME selection does not make me feel good, and the 'static inline' 
is puked-over by certain C compilers. It'd be probably fine to just use a 
simple function, though the above should work just fine.

real    0m0.665s
user    0m0.655s
sys     0m0.010s

(Opteron 252)



- Davide


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]