[過去ログ]
Ruby 初心者スレッド Part 66 (1002レス)
Ruby 初心者スレッド Part 66 http://mevius.5ch.net/test/read.cgi/tech/1578068134/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
535: デフォルトの名無しさん (ワッチョイ 275f-8Kp1) [sage] 2020/05/23(土) 20:20:01.68 ID:x0bVPHOi0 >>534 # gem install benchmark_driver require 'benchmark_driver' Benchmark.driver do |x| x.prelude %{ input = (1..2_000_000).to_a.shuffle RUBY x.report 'push without size', %{o = []; input.each{|x| o.push x }} x.report '[]= with size (each_with_index)', %{o = Array.new(input.size); input.each_with_index{|x,ix| o[ix] = x }} x.report '[]= with size (each)', %{o = Array.new(input.size); i=0; input.each{|x| o[i] = x;i+=1 }} x.report 'block with size', %{o = Array.new(input.size){|x| input[x] }} end http://mevius.5ch.net/test/read.cgi/tech/1578068134/535
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 467 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.010s