-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
GForceissues relating to optimized grouping calculations (GForce)issues relating to optimized grouping calculations (GForce)feature requestperformance
Description
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
- subsets in
i
- joins in
i
minemR and myoung3
Metadata
Metadata
Assignees
Labels
GForceissues relating to optimized grouping calculations (GForce)issues relating to optimized grouping calculations (GForce)feature requestperformance