The fixed remark about comparison method. Added benchmarks and results. After this benchmark, i've noticed there are no profits when array size between 17 and 32 elements, but some degradation of speed for "diff" operation. ## Resu...DmitryBochkarev (Dmitry Bochkarev)
Eregon (Benoit Daloze) wrote: > Note that this would change the semantics as it uses #== and not #eql? to compare elements. > ... Yes, it is, I've missed this part, will fix. DmitryBochkarev (Dmitry Bochkarev)
Very often, arrays are used to filter parameters and to select interesting items from 2 collections and very often these collections are small enough, for example: ~~~ ruby SAFE_COLUMNS = [:id, :title, :created_at] def columns ...DmitryBochkarev (Dmitry Bochkarev)