Merge "Improve sorting performance by 2.5 times." into nyc-dev