mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
d19800b480
&method looks more elegant (to me) but it's 3 times slower: ``` require 'benchmark/ips' ARRAY = ["test", 2, 3, 4] Benchmark.ips do |x| x.report('fast') { ARRAY.map { |r| parse_record(r) } } x.report('slow') { ARRAY.map &method(:parse_record) } x.compare! end ``` Comparison: fast: 1046992.2 i/s slow: 332722.5 i/s - 3.15x slower |
||
---|---|---|
.. | ||
adapters | ||
helpers | ||
locale | ||
nodes | ||
adapters.rb | ||
configuration.rb | ||
constants.rb | ||
context.rb | ||
helpers.rb | ||
naming.rb | ||
nodes.rb | ||
predicate.rb | ||
ransacker.rb | ||
search.rb | ||
translate.rb | ||
version.rb | ||
visitor.rb |