Sha256: b43d1cd0bfb817946565a730e5b3ee5c4b027315c694ff27308b5ce4414140e1
Contents?: true
Size: 441 Bytes
Versions: 6
Compression:
Stored size: 441 Bytes
Contents
$:.unshift(File.dirname(__FILE__)+"/../../lib") require 'benchmark' require 'bencode' Benchmark.bmbm do |x| x.report("Decoding an integer") do 100_000.times do BEncode.load("i42e") end end x.report("Decoding an string") do 100_000.times do BEncode.load("6:foobar") end end x.report("Decoding a long integer array") do 100.times do BEncode.load("l" + ("i42e" * 1000) + "e") end end end
Version data entries
6 entries across 6 versions & 1 rubygems