[PPL-devel] mpz_addmul_ui with ui = 1
Vincent Lefevre
vincent at vinc17.org
Wed Feb 4 12:43:06 CET 2009
On 2009-02-03 08:06:44 +0100, Paul Zimmermann wrote:
> Dear Roberto,
>
> > // FIXME(0.10.1): the test seems to speed up the GMP computation.
> > if (tableau_ij != 0) {
> > scalar_value = tableau_ij * norm_factor[i];
> > add_mul_assign(challenger_den, scalar_value, scalar_value);
> > }
> >
> > inline void
> > add_mul_assign(GMP_Integer& x, const GMP_Integer& y, const GMP_Integer& z) {
> > mpz_addmul(x.get_mpz_t(), y.get_mpz_t(), z.get_mpz_t());
> > }
>
> I'm ignorant about C++, but maybe the speedup you observe is due to the
> scalar_value = tableau_ij * norm_factor[i] instruction which is not done
> any more (which types have scalar_value, tableau_ij and norm_factor[i] ?),
But for the other test, there is no such assignment.
--
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
More information about the gmp-discuss
mailing list