I could not find any information on whether this is possible, but it would be useful so that I could call the method on a command in the rails console and determine the performance using any measurements, but I was mostly thinking about time.
For example, I'm trying to figure out which one is faster:
[val2,val3,val4,val5,val6].find{|x| x != val1} [val2,val3,val4,val5,val6].all?{|x| x == val1}
Is there something like this?
[val2,val3,val4,val5,val6].find{|x| x != val1}.performance
benchmarking ruby ruby-on-rails
perseverance
source share