Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding an atime test case; new with optimization to allow avoid [ overhead #PR4488 #6290

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .ci/atime/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,26 @@ test.list <- atime::atime_test_list(
data.table:::setDT(L)
},
Slow = "c4a2085e35689a108d67dacb2f8261e4964d7e12", # Parent of the first commit in the PR that fixes the issue (https://github.com/Rdatatable/data.table/commit/7cc4da4c1c8e568f655ab5167922dcdb75953801)
Fast = "1872f473b20fdcddc5c1b35d79fe9229cd9a1d15") # Last commit in the PR that fixes the issue (https://github.com/Rdatatable/data.table/pull/5427/commits)
Fast = "1872f473b20fdcddc5c1b35d79fe9229cd9a1d15"), # Last commit in the PR that fixes the issue (https://github.com/Rdatatable/data.table/pull/5427/commits)

# Issue reported in: https://github.com/Rdatatable/data.table/issues/3735
# To be fixed in: https://github.com/Rdatatable/data.table/pull/4488
"Selecting from data.table by row is very slow #4488" = atime::atime_test(
N = 10^seq(1, 20),
setup = {
allIterations <- data.frame(v1 = runif(N), v2 = runif(N))
DoSomething <- function(row) {
someCalculation <- row[["v1"]] + 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs indentation within this scope

}
allIteration_dt <- as.data.table(allIterations)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the point of this line? it's not being used anywhere inside the evaluated expression, noh? (expr is only using allIterations)

setDTthreads(1)
},
expr = {
for (r in 1:nrow(allIterations)) {
DoSomething(data.table:::`[.data.table`(allIterations, r, ))
}
},
slow="d47a83fb2e25582e508f191f87a31ca81b736b57",#Parent of the first commit in the PR that fixes the issue
DorisAmoakohene marked this conversation as resolved.
Show resolved Hide resolved
fast="958e3dd3cba7c259220aa653bef4beb8ad74b239") # last commit in the PR that fixes the issue (https://github.com/Rdatatable/data.table/pull/4488/commits)
)
# nolint end: undesirable_operator_linter.
Loading