You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submitted by: Michele Carriero; Assigned to: Nobody; R-Forge link
Hello,
is the following difference in time expected or is possible to decrease it?
date<-seq.Date(as.Date("2010-01-01"), as.Date("2014-01-01"),"day")dt1 <- data.table(date=date, var1=rnorm(length(date)), var2=rnorm(length(date)), var3=rnorm(length(date)), key="date")date<-seq.Date(as.Date("2010-01-01"), as.Date("2014-01-01"),"month")dt2 <- data.table(date=date, var4=rnorm(length(date),100), key="date")> microbenchmark(dt2[dt1, roll=T][, list(date, var1, var2, var4)],dt2[dt1, list(var1, var2, var4), roll=T])Unit: milliseconds expr min lq median uq max neval dt2[dt1, roll = T][, list(date, var1, var2, var4)]1.5641171.6109411.6462191.6893552.227991100 dt2[dt1, list(var1, var2, var4), roll = T]2.8113682.9436623.0331413.1511623.453434100
The expressions are "equal", using all.equal(,check.attributes=F). In this example it's just twice slower but it gets larger as the tables increase in size.
The text was updated successfully, but these errors were encountered:
By implementing FR #371 in commit 2679047 by Matt, this issue has been automatically fixed. Here's the microbenchmark timings now:
Unit: milliseconds expr min lq median dt2[dt1, roll = T][, list(date, var1, var2, var4)]3.8104683.9535494.176619 dt2[dt1, list(var1, var2, var4), roll = T]1.9589302.0438092.108974 uq max neval4.6639308.1263531002.3114149.342197100
Submitted by: Michele Carriero; Assigned to: Nobody; R-Forge link
Hello,
is the following difference in time expected or is possible to decrease it?
The expressions are "equal", using all.equal(,check.attributes=F). In this example it's just twice slower but it gets larger as the tables increase in size.
The text was updated successfully, but these errors were encountered: