Sha256: be8ad9ac9b9d13f5abcddfd61dc6ec8eecfabb0a97bdcd4cdbc5588781cb1357

Contents?: true

Size: 238 Bytes

Versions: 14

Compression:

Stored size: 238 Bytes

Contents

require_relative './shared'

cs = CharacterSet[]
ss = SortedSet[]

benchmark(
  caption: 'Adding entries',
  cases: {
    'CharacterSet#add' => -> { cs.add(rand(0x10FFFF)) },
    'SortedSet#add'    => -> { ss.add(rand(0x10FFFF)) },
  }
)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
character_set-1.8.0-java tasks/benchmarks/z_add.rb
character_set-1.8.0 tasks/benchmarks/z_add.rb
character_set-1.7.0-java tasks/benchmarks/z_add.rb
character_set-1.7.0 tasks/benchmarks/z_add.rb
character_set-1.6.0-java benchmarks/z_add.rb
character_set-1.6.0 benchmarks/z_add.rb
character_set-1.5.0-java benchmarks/z_add.rb
character_set-1.5.0 benchmarks/z_add.rb
character_set-1.4.1-java benchmarks/z_add.rb
character_set-1.4.1 benchmarks/z_add.rb
character_set-1.4.0-java benchmarks/z_add.rb
character_set-1.4.0 benchmarks/z_add.rb
character_set-1.3.0-java benchmarks/z_add.rb
character_set-1.3.0 benchmarks/z_add.rb