Sha256: f9de73550997abbeec20bf0997f790b891b98196dc3c6105c73b93821955b50f
Contents?: true
Size: 283 Bytes
Versions: 14
Compression:
Stored size: 283 Bytes
Contents
require_relative './shared' str = 'Lorem ipsum et dolorem' tr = '^A-Za-z' cs = CharacterSet.non_ascii_letter benchmark( caption: 'Counting non-letters', cases: { 'String#count' => -> { str.count(tr) }, 'CharacterSet#count_in' => -> { cs.count_in(str) }, } )
Version data entries
14 entries across 14 versions & 1 rubygems