Sha256: d54cfc117569f8f9dec017dc9fab77e3375b5b9fc8b927d1bc105d9bff45d309

Contents?: true

Size: 302 Bytes

Versions: 30

Compression:

Stored size: 302 Bytes

Contents

# encoding: utf-8

require "benchmark"

$LOAD_PATH.unshift "lib"
require "ffi-icu"
require "rchardet"

TESTS = 1000

Benchmark.bmbm do |results|
  results.report("rchardet:") { TESTS.times { CharDet.detect("æåø") } }
  results.report("ffi-icu:") { TESTS.times { ICU::CharDet.detect("æåø") } }
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ffi-icu-0.5.3 benchmark/detect.rb
ffi-icu-0.5.2 benchmark/detect.rb
ffi-icu-0.5.1 benchmark/detect.rb
ffi-icu-0.5.0 benchmark/detect.rb
ffi-icu-0.4.3 benchmark/detect.rb
ffi-icu-0.4.2 benchmark/detect.rb
ffi-icu-0.4.1 benchmark/detect.rb
ffi-icu-0.4.0 benchmark/detect.rb
ffi-icu-0.3.0 benchmark/detect.rb
ffi-icu-0.2.0 benchmark/detect.rb
ffi-icu-0.1.10 benchmark/detect.rb
ffi-icu-0.1.9 benchmark/detect.rb
ffi-icu-0.1.8 benchmark/detect.rb
ffi-icu-0.1.7 benchmark/detect.rb
ffi-icu-0.1.6 benchmark/detect.rb
ffi-icu-0.1.5 benchmark/detect.rb
ffi-icu-0.1.4 benchmark/detect.rb
ffi-icu-0.1.3 benchmark/detect.rb
ffi-icu-0.1.2 benchmark/detect.rb
ffi-icu-0.1.1 benchmark/detect.rb