class BenchBenchmark

Public Class Methods

bench_benchmark() click to toggle source
# File vendor/qwik/lib/qwik/bench-bench.rb, line 20
def self.bench_benchmark
  BenchmarkModule::benchmark {
    'a'*10_000_000 
  }
end
bench_itself() click to toggle source
# File vendor/qwik/lib/qwik/bench-bench.rb, line 9
def self.bench_itself
  puts Benchmark.measure { 'a'*1_000_000 }

  n = 50_000
  Benchmark.bm(7) {|x|
    x.report { for i in 1..n; a = '1'; end }
    x.report { n.times do   ; a = '1'; end }
    x.report { 1.upto(n) do ; a = '1'; end }
  }
end