mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
9dd64f2e0c
BTW, select works quite faster then find_all: require 'benchmark' n = [1]*100_000_000 Benchmark.bm do |x| x.report { n.select { |a| a > 1 } } x.report { n.find_all { |a| a > 1 } } end user system total real 7.590000 0.010000 7.600000 ( 7.927171) 9.650000 0.010000 9.660000 ( 9.634406) |
||
---|---|---|
.. | ||
abstract_controller | ||
action_controller | ||
action_dispatch | ||
action_pack | ||
action_view | ||
sprockets | ||
abstract_controller.rb | ||
action_controller.rb | ||
action_dispatch.rb | ||
action_pack.rb | ||
action_view.rb |