http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56202

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-02-04 
17:35:00 UTC ---
I would understand something like:


         const double __e = -std::log(1.0 - __aurng());
        if (__t == __x)
          {
          return __x;
          }
            else if (__e) continue;
         __sum += __e / (__t - __x);
         __x += 1;
       }

but the possibility that __e is zero is so small that the time wasted in the
test doesn't compensate for the micro-optimization of skipping one iteration.

Also, can't we use unlikely() here like "if (unlikely(_t == __x))"?

Reply via email to