I noticed there is significant speed difference between `DT[,.SD[.N], by=col]` and `DT[,.last(.SD), by=col]` for relatively large data (10 * 1.8M rows). <img width="852" alt="image" src="https://user-images.githubusercontent.com/46496637/99320355-753b4e80-2839-11eb-9ba1-487f1d9e9de5.png"> `DT[,.SD[1],by=col]` and `DT[,first(.SD), by=col]` did not show difference in performance, however. <img width="868" alt="image" src="https://user-images.githubusercontent.com/46496637/99320476-b3387280-2839-11eb-904a-237960524169.png">
I noticed there is significant speed difference between
DT[,.SD[.N], by=col]andDT[,.last(.SD), by=col]for relatively large data (10 * 1.8M rows).
DT[,.SD[1],by=col]andDT[,first(.SD), by=col]did not show difference in performance, however.