# module Benchmark::Helpers

### Public Class Methods

fixnum_max() click to toggle source

    # File lib/benchmark/helpers.rb, line 4
    def fixnum_max
      if Object.const_defined?(:RUBY_ENGINE)
        case RUBY_ENGINE
        when "ruby"
          2 ** (wordsize - 2) - 1
        when "rbx"
          Fixnum::MAX
        when "jruby"
          9223372036854775807
        else
          raise "Maximum Fixnum size now known yet for #{RUBY_ENGINE}"
        end
      else
        2 ** (wordsize - 2) - 1
      end
    end

fixnum_min() click to toggle source

    # File lib/benchmark/helpers.rb, line 22
     def fixnum_min
        if Object.const_defined?(:RUBY_ENGINE)
         case RUBY_ENGINE
         when "ruby"
           - 2 ** (wordsize - 2)
         when "rbx"
           Fixnum::MIN
         when "jruby"
           -9223372036854775808
         else
           raise "Maximum Fixnum size now known yet for #{RUBY_ENGINE}"
         end
       else
         - 2 ** (wordsize - 2)
       end
    end

wordsize() click to toggle source

    # File lib/benchmark/helpers.rb, line 40
    def wordsize
      8 * 1.size
    end