Improve function efficiency
bschilder opened this issue · comments
Some key ways to generally improve the efficiency of your code:
- Use
lapply
orReduce
instead offor
loops where possible. - Use
data.table
s instead ofdata.frame
s and take advantage of their speedy vectorized transformations. - Consider parallelizing steps across multiple cores for speed boosts (e.g. via the
parallel
package). I'll leave it to you to decide whether (and where) you'd like to implement this.