Sha256: cb4c3c355e7c48a20ffce837a2fb92ce454efed44040d3dc3c0499737c06e690

Contents?: true

Size: 357 Bytes

Versions: 1

Compression:

Stored size: 357 Bytes

Contents

def micro_harness_input
  s = "abcdefghij" * 1_000_000
  t = s.dup

  # Ensure to unshare the underlying buffers
  t[0] = 'z'
  t[0] = 'a'

  [s, t]
end

def micro_harness_iterations
  100
end

def micro_harness_sample(input)
  s = input[0]
  t = input[1]

  r = s == t
  r ? 1 : 0
end

def micro_harness_expected
  1
end

require 'bench9000/micro-harness'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bench9000-0.1 benchmarks/micro/string-equal.rb