You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
I don't have an answer to the second question, but on the first one:
sort is the sorting engine - internal, performance optimized command to sort observations in ascending order;
gsort is a convenience wrapper - implemented as an ado file, hardly changed since version 6, and allowing among other things sorting in descending order. For that it creates temporary variables, which (I expect) make it slower.
gsort doesn't really fit well with anything else in Stata. It is in some ways more of a specialised sort command than a generalised one! I'd guess it will remain that way.
Another specific answer to Dimitriy's question is
Code:
bysort panelvar: egen event_in_rev_chron_order = rank(-time)
Comment