lib/perfer/job/iteration_job.rb
def measure_call_times(n)
      GC.start
      if !@block
        if n % repeat_eval != 0
          raise Error, "Implementation error: #{n} not multiple of #{repeat_eval}"
        end
        n /= repeat_eval
        measure_call_times_code(n, *@data.values)
      else
        Perfer.measure { n.times(&@block) }
      end.tap { |m| p m if verbose }
    end
# This factor ensure some margin,
# to avoid endlessly changing the number of iterations
This factor ensure some margin,
to avoid endlessly changing the number of iterations
This factor ensure some margin to avoid endlessly changing the number of iterations
def measure_call_times(n)
      GC.start
      if !@block
        if n % repeat_eval != 0
          raise Error, "Implementation error: #{n} not multiple of #{repeat_eval}"
        end
        n /= repeat_eval
        measure_call_times_code(n, *@data.values)
      else
        Perfer.measure { n.times(&@block) }
      end.tap { |m| p m if verbose }
    end
def measure_call_times ( n ) GC . start if ! @block if n % repeat_eval != 0 raise Error , "Implementation error: #{n} not multiple of #{repeat_eval}" end n /= repeat_eval measure_call_times_code ( n , * @data . values ) else Perfer . measure { n . times ( & @block ) } end . tap { | m | p m if verbose } end
This factor ensure some margin,
to avoid endlessly changing the number of iterations
This factor ensure some margin to avoid endlessly changing the number of iterations
n