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
{{ message }}
Repository navigation
GForce should kick in when i is present as well... #971
require(data.table) # 1.9.5, R v3.1.2
DT = data.table(x=c(1,1,1,2,2,3,3,3), y=1:8)
options(datatable.verbose=TRUE)
# GForce kicks in
DT[, mean(y),by=x]
# Detected that j uses these columns: y
# Finding groups (bysameorder=FALSE) ... done in 0secs. bysameorder=TRUE and o__ is length 0
# lapply optimization is on, j unchanged as 'mean(y)'
# GForce optimized j to 'gmean(y)'
# x V1
#1: 1 2.0
#2: 2 4.5
#3: 3 7.0
# GForce doesn't
DT[x > 1L, mean(y), by=x]
# i clause present and columns used in by detected, only these subset: x
# Detected that j uses these columns: y
# Finding groups (bysameorder=FALSE) ... done in 0secs. bysameorder=TRUE and o__ is length 0
# lapply optimization is on, j unchanged as 'mean(y)'
# Old mean optimization changed j from 'mean(y)' to '.External(Cfastmean, y, FALSE)'
# Starting dogroups ...
# collecting discontiguous groups took 0.000s for 2 groups
# eval(j) took 0.000s for 2 calls
# done dogroups in 0 secs
# x V1
#1: 2 4.5
#2: 3 7.0
Activity
GForce kicks in on subsets in `i`, #971.