A limitation of atime comes from the fact that it uses bench::mark() to measure time/memory for each data size. In particular, this method runs timings for each expression several times, without re-running the setup expression. This makes it difficult to run timings on functions that alter their inputs by reference. For example, data.table::setkey(DT) alters DT by reference (sort in place); the first execution for memory measurement will sort the data, and subsequent executions for time measurement will do a linear scan to verify the data is sorted (faster). Future versions of atime could overcome this limitation, by removing the dependency on bench, and implementing a time/memory measurement procedure that runs the setup expression prior to each measurement.
A limitation of atime comes from the fact that it uses
bench::mark()to measure time/memory for each data size. In particular, this method runs timings for each expression several times, without re-running the setup expression. This makes it difficult to run timings on functions that alter their inputs by reference. For example,data.table::setkey(DT)alters DT by reference (sort in place); the first execution for memory measurement will sort the data, and subsequent executions for time measurement will do a linear scan to verify the data is sorted (faster). Future versions of atime could overcome this limitation, by removing the dependency on bench, and implementing a time/memory measurement procedure that runs the setup expression prior to each measurement.