1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00
activerecord-hackery--ransack/lib/ransack
Jon Atack d19800b480 Speed this up a bit
&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
2015-08-29 13:02:41 +02:00
..
adapters Merge pull request #498 from pencilcheck/patch-1 2015-07-12 12:21:15 +02:00
helpers Speed this up a bit 2015-08-29 13:02:41 +02:00
locale Compare and adjust German locale with localeapp translation 2015-05-11 15:11:55 +02:00
nodes Merge pull request #562 from hoshitocat/fixed/let-attributes-use-and-or 2015-07-12 13:06:49 +02:00
adapters.rb ActiveRecord excludes Mongoid 2015-05-22 18:46:28 +03:00
configuration.rb Add documentation for Ransack configuration options 2015-08-28 00:00:42 +02:00
constants.rb Revert #503 and follow-up commit 2015-02-02 17:01:20 +01:00
context.rb ActiveRecord excludes Mongoid 2015-05-22 18:46:28 +03:00
helpers.rb Initial commit. 2011-03-30 20:31:39 -04:00
naming.rb Fix #518: undefined method model_name 2015-03-31 21:25:55 +05:30
nodes.rb ActiveRecord excludes Mongoid 2015-05-22 18:46:28 +03:00
predicate.rb allowing ':wants_array' to be passed as 'false' in predicate options 2015-03-24 09:01:37 +00:00
ransacker.rb Maintain Ruby 1.8.7 syntax compatibility 2014-05-01 15:55:39 +02:00
search.rb ActiveRecord excludes Mongoid 2015-05-22 18:46:28 +03:00
translate.rb [skip ci[ Remove unused code 2015-03-25 10:36:47 +05:30
version.rb Release 1.7.0 2015-08-20 12:46:41 +02:00
visitor.rb Revert 846b168 2014-12-20 23:50:10 +01:00