Slight speedup of fft for integer multiplication.

This commit is contained in:
wbhart 2012-10-21 17:02:34 +00:00
parent 9aa3e9bb9e
commit 1c673701fe
3 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
@set UPDATED 3 October 2012
@set UPDATED 18 October 2012
@set UPDATED-MONTH October 2012
@set EDITION 2.6.0
@set VERSION 2.6.0

View File

@ -1,4 +1,4 @@
@set UPDATED 5 October 2012
@set UPDATED 18 October 2012
@set UPDATED-MONTH October 2012
@set EDITION 2.6.0
@set VERSION 2.6.0

View File

@ -91,6 +91,14 @@ mpn_mul_fft_main(mp_ptr r1, mp_srcptr i1, mp_size_t n1, mp_srcptr i2, mp_size_t
}
mpn_mul_trunc_sqrt2(r1, i1, n1, i2, n2, depth, w);
} else
} else
{
if (j1 + j2 - 1 <= 3*n)
{
depth--;
w *= 3;
}
mpn_mul_mfa_trunc_sqrt2(r1, i1, n1, i2, n2, depth, w);
}
}
}