Sha256: 1cc3970e1e0d71bda98306cc424b4cf2817f912431b4f3648e917dafb1eedc33
Contents?: true
Size: 426 Bytes
Versions: 30
Compression:
Stored size: 426 Bytes
Contents
# encoding: utf-8 require "benchmark" $LOAD_PATH.unshift "lib" require "ffi-icu" require "rchardet" TESTS = 1000 $rchardet = CharDet::UniversalDetector.new $icu = ICU::CharDet::Detector.new Benchmark.bmbm do |results| results.report("rchardet instance:") { TESTS.times { $rchardet.reset; $rchardet.feed("æåø"); $rchardet.result } } results.report("ffi-icu instance:") { TESTS.times { $icu.detect("æåø") } } end
Version data entries
30 entries across 30 versions & 1 rubygems