On Fri, 4 May 2012 11:03:42 -0600 Eduardo Silva <[email protected]> wrote:
> My only concern is the integer overflow, with 64 bits we will not have > issues for a few years, but is not the case for 32 bit platform. > > What about a little modification to use unsigned int and validate > against UINT_MAX ? so when it reach the limit it can reset the > counters ?? > The variables are 64-bit on all linux platforms. I calculated 300k years of 30k hits per second per thread before wrapping, for the 64bit variables. Using 32-bit ints with such detection is doable, but it is more work for very little gain. 32-bit substraction is only a cycle or two faster than 64-bit one, the check code would far overrun the savings. - Lauri _______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
