From: Tanaka Akira Date: 2013-07-21T16:55:58+09:00 Subject: [ruby-core:56101] Re: [ruby-trunk - Feature #8658][Open] Process.clock_gettime 2013/7/21 "Martin J. D�rst" : > > On 2013/07/19 21:32, akr (Akira Tanaka) wrote: > >> On LP64 systems, Fixnum can represent 2**62-1. >> So (2**62-1)/(365.25*24*60*60*1e9)=146.1 years are representable >> without object allocation. >> >> On ILP32 and LLP64 systems, Fixnum can represent 2**30-1. >> So (2**30-1)/1e9=1.07 seconds are representable >> without object allocation. >> This means Bignum allocations are mostly required except >> the origin is very recent. > > > Don't your calculations ignore the fact that Fixnums are signed? Or do you > have a way to use negative amounts of nanoseconds, too? % ./ruby -ve 'p (2**62-1).class, (2**62).class' ruby 2.1.0dev (2013-07-21 trunk 42095) [x86_64-linux] Fixnum Bignum % ./ruby -ve 'p (2**30-1).class, (2**30).class' ruby 2.1.0dev (2013-07-21 trunk 42095) [i686-linux] Fixnum Bignum What's the problem? -- Tanaka Akira