On Thu, May 5, 2011 at 2:27 PM, Abdurrahman Carkacioglu <carkaci@xxxxxxxxx> wrote: > Something like following code. > > http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c > fast-math will not typically affect this code. The math here is primarily integer arithmetic, and has a lot of loops. Are you generating floating point random numbers? If so, and you can afford the small precision penalty, you could precompute the divisions as reciprocals, which are then multiplied at runtime. Otherwise, you'll need a profiler to guide you to the problematic lines of code. If you can narrow it down to a missed loop-unroll or something similar, likely someone on this list (other than me :) ) will be able to help you further. Brian