{"blog_url":"https://shuzo-kino.hateblo.jp/","published":"2015-04-26 10:33:50","image_url":null,"title":"Benchmark-IPS\u3067Ruby\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3092\u4fbf\u5229\u306b\u4f7f\u3046","width":"100%","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshuzo-kino.hateblo.jp%2Fentry%2F2015%2F04%2F26%2F103350\" title=\"Benchmark-IPS\u3067Ruby\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3092\u4fbf\u5229\u306b\u4f7f\u3046 - Bye Bye Moore\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://shuzo-kino.hateblo.jp/entry/2015/04/26/103350","height":"190","type":"rich","provider_name":"Hatena Blog","blog_title":"Bye Bye Moore","author_url":"https://blog.hatena.ne.jp/shuzo_kino/","categories":["ruby"],"description":"Benchmark-IPS\u306fRuby\u6a19\u6e96\u6dfb\u4ed8\u306eBenchmark\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4fbf\u5229\u306b\u62e1\u5f35\u3057\u3066\u304f\u308c\u308bGem\u3067\u3059\u3002 \u4f7f\u3044\u65b9 \u5c0e\u5165 $ gem install benchmark-ips \u7528\u4f8b \u666e\u901a\u306eBenchmark\u306a\u3089bm\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3068\u3053\u308d\u3001 ips\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3042\u305f\u308a\u304c\u9055\u3044\u307e\u3059\u3002 \u307e\u305f\u3001IPS\u306a\u3089compare!\u3068\u3044\u3046\u6bd4\u8f03\u7528\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002 require 'benchmark/ips' def slow %w(a b c).shuffle.first end def fast %w(a b c).sample end Benchmark.ips do |x| x.repo\u2026","author_name":"shuzo_kino","version":"1.0"}