Sped up sorting of columns