るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.008秒)
トップページ > クエリ:dup[x] > 種類:モジュール関数[x]

別のキーワード

  1. _builtin dup
  2. singleton dup
  3. etc sc_re_dup_max
  4. set dup
  5. bigdecimal dup

ライブラリ

モジュール

検索結果

Benchmark.#bmbm(width = 0) {|job| ... } -> [Benchmark::Tms] (13.0)

Benchmark::Job オブジェクトを生成して、それを引数として与えられたブロックを 実行します。

...

//emlist[][ruby]{
require 'benchmark'

array = (1..1000000).map { rand }

Benchmark.bmbm do |x|
x.report("sort!") { array.dup.sort! }
x.report("sort") { array.dup.sort }
end

#=>
#
# Rehearsal -----------------------------------------
# sort! 11.928000 0.010000 11.938000 ( 12.756000)...