On Sun, 10 Feb 2013, bodr...@mail.dm.unipi.it wrote:
I do not know if current gcc can optimise a loop like: for (int i = 3; (i < 1 << 30) && mpz_gt_ui_p (z, i); i <<= 1) ; but we give it the chance to.
You should use i*=2 instead of i<<=1 to maximize optimization opportunities. And then gcc does optimize this.
-- Marc Glisse _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org http://gmplib.org/mailman/listinfo/gmp-devel