File: z_minmax.rb

package info (click to toggle)
ruby-character-set 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 416 kB
  • sloc: ansic: 2,597; ruby: 1,290; makefile: 7; sh: 4
file content (12 lines) | stat: -rw-r--r-- 253 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative './shared'

cs = CharacterSet.new(0..0xFFFF)
ss = SortedSet.new(0..0xFFFF)

benchmark(
  caption: 'Getting the min and max',
  cases: {
    'CharacterSet#minmax' => -> { cs.minmax },
    'SortedSet#minmax'    => -> { ss.minmax },
  }
)