Your method creates a closure every time it's called, that wastes memory and creates garbage churn. Make your function once and reuse it.
His method creates a new closure but it does not create garbage. The closure is on the stack; when table.sort returns the closure is automatically erased. Nothing is allocated on the heap.