system.time(t1<-mydt[,mean(b),by=a])