git/xdiff
Thomas Rast 6f1af028ce xdiff: choose XDL_FAST_HASH code on sizeof(long) instead of __WORDSIZE
Darwin does not define __WORDSIZE, and compiles the 32-bit code path
on 64-bit systems, resulting in a totally broken git.

I could not find an alternative -- other than the platform symbols
(__x86_64__ etc.) -- that does the test in the preprocessor.  However,
we can also just test for the size of a 'long', which is what really
matters here.  Any compiler worth its salt will leave only the branch
relevant for its platform, and indeed on Linux/GCC the numbers don't
change:

 Test                                  tr/darwin-xdl-fast-hash   origin/next              origin/master
 ------------------------------------------------------------------------------------------------------------------
 4000.1: log -3000 (baseline)          0.09(0.07+0.01)           0.09(0.07+0.01) -5.5%*   0.09(0.07+0.01) -4.1%
 4000.2: log --raw -3000 (tree-only)   0.47(0.41+0.05)           0.47(0.40+0.05) -0.5%    0.45(0.38+0.06) -3.5%.
 4000.3: log -p -3000 (Myers)          1.81(1.67+0.12)           1.81(1.67+0.13) +0.3%    1.99(1.84+0.12) +10.2%***
 4000.4: log -p -3000 --histogram      1.79(1.66+0.11)           1.80(1.67+0.11) +0.4%    1.96(1.82+0.10) +9.2%***
 4000.5: log -p -3000 --patience       2.17(2.02+0.13)           2.20(2.04+0.13) +1.3%.   2.33(2.18+0.13) +7.4%***
 ------------------------------------------------------------------------------------------------------------------
 Significance hints:  '.' 0.1  '*' 0.05  '**' 0.01  '***' 0.001

Noticed-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-01 12:19:06 -07:00
..
xdiff.h diff: add option to show whole functions as context 2011-10-10 12:05:07 -07:00
xdiffi.c teach --histogram to diff 2011-07-12 09:29:20 -07:00
xdiffi.h teach --histogram to diff 2011-07-12 09:29:20 -07:00
xemit.c Merge branch 'rs/diff-postimage-in-context' 2012-01-29 13:18:55 -08:00
xemit.h Allow alternate "low-level" emit function from xdl_diff 2008-10-25 12:09:31 -07:00
xhistogram.c xdiff/xhistogram: drop need for additional variable 2011-08-08 13:00:17 -07:00
xinclude.h War on whitespace 2007-06-07 00:04:01 -07:00
xmacros.h xdiff: cast arguments for ctype functions to unsigned char 2010-10-06 10:46:45 -07:00
xmerge.c xdiff: cast arguments for ctype functions to unsigned char 2010-10-06 10:46:45 -07:00
xpatience.c xdiff/xpatience: factor out fall-back-diff function 2011-07-07 09:41:24 -07:00
xprepare.c Merge branch 'rs/diff-cleanup-records-fix' 2011-10-13 19:03:22 -07:00
xprepare.h War on whitespace 2007-06-07 00:04:01 -07:00
xtypes.h War on whitespace 2007-06-07 00:04:01 -07:00
xutils.c xdiff: choose XDL_FAST_HASH code on sizeof(long) instead of __WORDSIZE 2012-05-01 12:19:06 -07:00
xutils.h xdiff/xprepare: use a smaller sample size for histogram diff 2011-07-12 09:30:00 -07:00