Skip to content

Commit 9e871d4

Browse files
Convert a few to atime tests
1 parent 8ff16c9 commit 9e871d4

File tree

2 files changed

+33
-127
lines changed

2 files changed

+33
-127
lines changed

.ci/atime/tests.R

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,38 @@ test.list <- atime::atime_test_list(
286286
Slow = "548410d23dd74b625e8ea9aeb1a5d2e9dddd2927", # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/548410d23dd74b625e8ea9aeb1a5d2e9dddd2927)
287287
Fast = "c0b32a60466bed0e63420ec105bc75c34590865e"), # Commit in the PR (https://github.com/Rdatatable/data.table/pull/7144/commits) that uses a much faster implementation
288288

289+
"GForce aggregation (benchmark across # rows)" = atime::atime_test(
290+
setup = {
291+
set.seed(34893)
292+
DT = data.table(grp = sample.int(10L, N, TRUE), v=rnorm(N), i=sample(N), vna=rnorm(N))
293+
DT[1:3, vna := NA_real_]
294+
},
295+
expr = data.table:::`[.data.table`(DT, j=.(mean(v), sum(v), mean(i), sum(i), mean(vna, na.rm=TRUE), sum(vna, na.rm=TRUE))),
296+
`Status quo` = "8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0"), # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0)
297+
298+
"GForce aggregation (benchmark across # groups)" = atime::atime_test(
299+
setup = {
300+
set.seed(34893)
301+
DT = data.table(grp = sample.int(1e7, N, TRUE), v=rnorm(1e7), i=sample(1e7))
302+
},
303+
expr = data.table:::`[.data.table`(DT, j=.(mean(v), sum(v), mean(i), sum(i), mean(vna, na.rm=TRUE), sum(vna, na.rm=TRUE))),
304+
`Status quo` = "8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0"), # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0)
305+
306+
"Serial value setting with :=" = atime::atime_test(
307+
setup = {
308+
set.seed(34893)
309+
DT = data.table(i=N:1)
310+
},
311+
expr = for (ii in seq_len(nrow(DT))) data.table:::`[.data.table`(DT, ii, `:=`(i, ii)),
312+
`Status quo` = "8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0"), # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0)
313+
314+
"Serial value setting with set" = atime::atime_test(
315+
setup = {
316+
set.seed(34893)
317+
DT = data.table(i=N:1)
318+
},
319+
expr = for (ii in seq_len(nrow(DT))) set(DT, ii, "i", ii),
320+
`Status quo` = "8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0") # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/8f5ffa8bb8f3f5861020a6e32f897c30e42eeab0)
321+
289322
tests=extra.test.list)
290323
# nolint end: undesirable_operator_linter.

inst/tests/benchmarks.Rraw

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)