--- deliantra/server/include/util.h 2008/12/31 17:35:37 1.84 +++ deliantra/server/include/util.h 2009/01/03 01:04:19 1.86 @@ -30,10 +30,12 @@ # define is_constant(c) __builtin_constant_p (c) # define expect(expr,value) __builtin_expect ((expr),(value)) # define prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality) +# define noinline __attribute__((__noinline__)) #else # define is_constant(c) 0 # define expect(expr,value) (expr) # define prefetch(addr,rw,locality) +# define noinline #endif #if __GNUC__ < 4 || (__GNUC__ == 4 || __GNUC_MINOR__ < 4) @@ -409,6 +411,7 @@ // http://www.jstatsoft.org/v08/i14/paper // this one is about 40% faster than the tausworthe one above (i.e. not much), // despite the inlining, and has the issue of only creating 2**32-1 numbers. +// see also http://www.iro.umontreal.ca/~lecuyer/myftp/papers/xorshift.pdf struct xorshift_random_generator { uint32_t x, y;