Ciao,
I pushed Niels' code for mpn_neg. The old timings was:
@shell ~/gmp-repo$ tune/speed -s 1-1030 -f 2 -c mpn_neg mpn_com
mpn_add_1_inplace.1
overhead 6.78 cycles, precision 1 units of 2.86e-10 secs, CPU freq
3500.08 MHz
mpn_neg mpn_com mpn_add_1_inplace.1
1
Ciao Paul,
Il Lun, 18 Maggio 2015 11:33 am, paul zimmermann ha scritto:
mpn_neg_n (tp, tp, n);
should be mpn_neg instead? I have put this in
Yes, of course.
Anyway, in your code you should probably write:
mpn_com (tp + l, tp + l, h); /* Amended the _n ;-) */
mpn_add_1 (tp +
bodr...@mail.dm.unipi.it writes:
The new code is faster for n==1, slower for 2 = n = 4, and faster (more
than twice) for n = 16.
Nice speedup! In mpn/x86_64/fastsse/com.asm we have an mpn_com which
will speed things up another 2x. It is not enabled on any platforms now
as it needs
bodr...@mail.dm.unipi.it writes:
@shell ~/gmp-repo$ tune/speed -s 1-1030 -f 2 -c mpn_neg mpn_com
You might want to pass -p100 or somesuch to allow the CPU to speed
up. (We might want to change the default, not sure to what.)
--
Torbjörn
Please encrypt, key id 0xC8601622