[SalesForce] Sorting of DataTable on Client side in Lightning

I am sorting an Opportunity with its Name, Amount, Stage, Owner(All are in a data table as Columns). Now I want to sort (Ascending or Descending) the results on the client side when I click on the column.
I have gone through the following link and is helpful. Lightning client side sorting

Is there any other efficient sorting approach to handle this? (like Merge Sort/Quick Sort).As this contains large data sets the performance will go down if we use the same approach provided in the link. Can anyone please give me a working approach to sort large data sets in this context

Best Answer

I think this would be best approach to do so in javascript which is totally client side and it wont take much time as I am already using it on large data set it is not taking time. Again if you think it s taking time then please use lightning:spinner as well. I f you notice on standard list view on objects they are totally on server side.