syberia / mungebits2

Atomic production-ready data preparation in R
MIT License
3 stars 2 forks source link

add names of legacy mungebits to munged data frame attributes #40

Closed abelcastilloavant closed 7 years ago

abelcastilloavant commented 7 years ago

Let's make sure that legacy mungebits attach their names to the pieces that we store in the attributes of the munged data frame.

abelcastilloavant commented 7 years ago

@robertzk:

test_check("mungebits2")

  1. Failure: it doubles a column no more than 6x as slow as a raw operation (@test-column_transformation.R#240) column_transformation_runtime < 6 * apply_raw_function_runtime isn't true. Execution of column_transformation took too long: Former took 105.428ms but latter took 14.566ms. You need to make sure the code for column_transformation stays efficient relative to raw_double (see code for this unit test)
robertzk commented 7 years ago

@abelcastilloavant If that's capricious then a rebuild should fix it. Otherwise, this naming assignment may not be fully optimized. In particular, I think names(a)[b] <- c replicates the entire names vector in memory.

robertzk commented 7 years ago

@abelcastilloavant Can you add a test somehow as well?