Sha256: 85e7af2db8c3613cd4f095bddc7cd8c528a3ffdcd32571b8a2eed2ea1fcb75a4
Contents?: true
Size: 675 Bytes
Versions: 38
Compression:
Stored size: 675 Bytes
Contents
require "benchmark" require_relative "../lib/rust_blank" n = 1_000_000 Benchmark.bmbm do |x| x.report("empty") do n.times {"".blank?} end x.report("blank") do n.times {" ".blank?} end x.report("present") do n.times {"x".blank?} end x.report("lots of spaces blank") do n.times {" ".blank?} end x.report("lots of spaces present") do n.times {" x".blank?} end x.report("blank US-ASCII") do s = " ".encode("US-ASCII") n.times {s.blank?} end x.report("blank non-utf-8") do s = " ".encode("UTF-16LE") n.times {s.blank?} end end
Version data entries
38 entries across 38 versions & 1 rubygems