gbm-developers / gbm3

Gradient boosted models
134 stars 116 forks source link

Scoring factor variables is a lot slower than CRAN gbm #40

Open DexGroves opened 9 years ago

DexGroves commented 9 years ago

I think it may be connected to this: https://github.com/gbm-developers/gbm/issues/18

gbm-developer gbm is calling LENGTH(VECTOR_ELT(x)) a heck of a lot in the c++ since that fix got implemented.

Some reproduction code: https://gist.github.com/DexGroves/9d821dde795108a09f51

pdmetcalfe commented 9 years ago

Precomputing the lengths ought to help, if that's the problem?

pdmetcalfe commented 8 years ago

All this now done in Rcpp; should have gone away. Could you possibly check?