Pre calculate sorts