From: Tamara Temple Date: 2013-06-29T11:21:20+09:00 Subject: Re: Best practice to use Enumerable#Sort and Enumerable#Sort_by Love U Ruby wrote: > Thanks for your feed back. Why #sort_by here is faster? > > user system total real > Sort 0.000000 0.000000 0.000000 ( 0.000041) > Sort by 0.000000 0.000000 0.000000 ( 0.000019) You can't go by real time -- you system could have been doing something else during the time you ran each benchmark. Notice all the other values register zero, which means there wasn't enough time spent in any of them to make a meaningful benchmark. Run each of your tests 10,000 times, then see how they compare. (Note: you may still end up with one being slower than the other; I don't know. I'm just saying your current benchmarking is not meaningful enough to make a determination.)