There must be reasons why fastxtile is still faster than xtile, but any benefit from not using sorting would not propagate to binscatter (without xq) because of the line
if !(`touse_first'==1 & word("`:sortedby'",1)=="`x_r'") sort `touse' `x_r'
I am surprised if randvar, randcut or randn make a difference after this, unless they make things worse. Picking the quantiles of a sorted list is trivial.
If this is a path-dependent issue, this might be a cul-de-sac on the path. If there are good reasons for this, of course, never mind.
There must be reasons why
fastxtile
is still faster thanxtile
, but any benefit from not using sorting would not propagate tobinscatter
(withoutxq
) because of the lineI am surprised if
randvar
,randcut
orrandn
make a difference after this, unless they make things worse. Picking the quantiles of a sorted list is trivial.If this is a path-dependent issue, this might be a cul-de-sac on the path. If there are good reasons for this, of course, never mind.