Forum Discussion

Nishkarsh31's avatar
Nishkarsh31
Brass Contributor
Nov 20, 2022
Solved

Are CHOOSECOLUMNS() , TAKE(), DROP() etc faster than INDEX(), FILTER() to return selective columns ?

Hi, so I've made multiple worksheets in the past where when I had to return a particular columns from the spilled array. I either used INDEX() when the required column was dynamic Eg INDEX(array#,...
  • PeterBartholomew1's avatar
    Nov 21, 2022

    Nishkarsh31 

    I didn't have any data to judge the answer to your question since I tend not to drive my workbooks to the point of collapse.  However, I have now run a couple of test cases using Charles Williams's timing routines.

     

    Extracting half a million values from the middle of a 1,000,000 by 1 array took ~130 ms using INDEX/SEQUENCE and ~80 ms with TAKE/DROP.

     

    More closely related to your problem, extracting columns 2 and 5 from a 1,000,000 by 5 array took ~720 ms using INDEX/SEQUENCE and ~500 ms with CHOOSECOLS.

     

    So, it looks as if traditional formulas take about half as long again as the newly implemented array formulas as well as the newer functions improving readability.