mata is fast for many things, but sorting a vector is not one of them.
Below I generate a random vector containing 1 million observations. I sort it 100 times. This process takes mata a little over 75 seconds. The same exercise in R takes around 17 seconds. This is a considerable time difference which only gets worse the larger the number of observations.
If I have one item in my wishlist is for Stata to update their sort, in mata and in Stata. Please make the update backwards compatible, not only for Stata 15.
Below I generate a random vector containing 1 million observations. I sort it 100 times. This process takes mata a little over 75 seconds. The same exercise in R takes around 17 seconds. This is a considerable time difference which only gets worse the larger the number of observations.
If I have one item in my wishlist is for Stata to update their sort, in mata and in Stata. Please make the update backwards compatible, not only for Stata 15.
Comment