From aa40599e534aaed292e0e977bcd14584960547ea Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 14:16:04 -0400 Subject: [PATCH 01/37] Fast --- .ci/atime/tests.R | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 2d342ded67..701f21d268 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -331,6 +331,7 @@ test.list <- atime::atime_test_list( PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", # Merge commit (https://github.com/Rdatatable/data.table/commit/0216983c51e03e3f61d5e6f08f4ba0c42cceb22c) of a PR (https://github.com/Rdatatable/data.table/pull/7401) which increased speed and memory usage of this test (https://github.com/Rdatatable/data.table/issues/7687) Before = "7a9eaf62ede487625200981018d8692be8c6f134", # Parent of the first commit (https://github.com/Rdatatable/data.table/commit/515de90a6068911a148e54343a3503043b8bb87c) in the PR (https://github.com/Rdatatable/data.table/pull/4164/commits) that introduced the regression Regression = "c152ced0e5799acee1589910c69c1a2c6586b95d", # Parent of the first commit (https://github.com/Rdatatable/data.table/commit/15f0598b9828d3af2eb8ddc9b38e0356f42afe4f) in the PR (https://github.com/Rdatatable/data.table/pull/4558/commits) that fixes the regression + Fast="1.18.6", Fixed = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), From 657940ae9a29128c87d733118f505d93fa81ac86 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 14:33:15 -0400 Subject: [PATCH 02/37] rename commits --- .ci/atime/tests.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 701f21d268..7bf9cd13ce 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -328,11 +328,10 @@ test.list <- atime::atime_test_list( v2 = sample(5L, N, TRUE) ) }, - PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", # Merge commit (https://github.com/Rdatatable/data.table/commit/0216983c51e03e3f61d5e6f08f4ba0c42cceb22c) of a PR (https://github.com/Rdatatable/data.table/pull/7401) which increased speed and memory usage of this test (https://github.com/Rdatatable/data.table/issues/7687) - Before = "7a9eaf62ede487625200981018d8692be8c6f134", # Parent of the first commit (https://github.com/Rdatatable/data.table/commit/515de90a6068911a148e54343a3503043b8bb87c) in the PR (https://github.com/Rdatatable/data.table/pull/4164/commits) that introduced the regression - Regression = "c152ced0e5799acee1589910c69c1a2c6586b95d", # Parent of the first commit (https://github.com/Rdatatable/data.table/commit/15f0598b9828d3af2eb8ddc9b38e0356f42afe4f) in the PR (https://github.com/Rdatatable/data.table/pull/4558/commits) that fixes the regression + Before = "1.12.0", + Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) + Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Fast="1.18.6", - Fixed = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), # Issue with sorting again when already sorted, as reported in https://github.com/Rdatatable/data.table/issues/4498 From 623bd2ff5ecfb97fcf89406970aa89ac1558df6f Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 14:41:44 -0400 Subject: [PATCH 03/37] 1.12.8 --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 7bf9cd13ce..c1dfee4636 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -328,7 +328,7 @@ test.list <- atime::atime_test_list( v2 = sample(5L, N, TRUE) ) }, - Before = "1.12.0", + Before = "1.12.8", Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Fast="1.18.6", From 30885fd9a9e01c1e7c17d6c505a7fe783489f752 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 14:46:28 -0400 Subject: [PATCH 04/37] comment Before --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index c1dfee4636..cd3a22a42a 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -328,7 +328,7 @@ test.list <- atime::atime_test_list( v2 = sample(5L, N, TRUE) ) }, - Before = "1.12.8", + #Before = "1.12.8", Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Fast="1.18.6", From 66e1cded4e739e4e6eed8b1bb6c94bd54465074c Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 15:01:23 -0400 Subject: [PATCH 05/37] fast=master --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index cd3a22a42a..f5fdbbe946 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -331,7 +331,7 @@ test.list <- atime::atime_test_list( #Before = "1.12.8", Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression - Fast="1.18.6", + Fast="master", expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), # Issue with sorting again when already sorted, as reported in https://github.com/Rdatatable/data.table/issues/4498 From 5dc14b864636294f5561c2356fbf680d56dc5a63 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 15:07:58 -0400 Subject: [PATCH 06/37] new Before --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index f5fdbbe946..c95915297d 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -328,7 +328,7 @@ test.list <- atime::atime_test_list( v2 = sample(5L, N, TRUE) ) }, - #Before = "1.12.8", + Before = "166e0bab317e9d9f4f1844997a315e6482ab5fd9",#a few click of parent up from first commit in PR4164 gets to https://github.com/Rdatatable/data.table/commit/166e0bab317e9d9f4f1844997a315e6482ab5fd9 Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Fast="master", From 918be2c28862afc38e779fd9ba2c988334c41a60 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 15:14:42 -0400 Subject: [PATCH 07/37] bisect viz script --- .ci/atime/bisect-7687.R | 162 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 .ci/atime/bisect-7687.R diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R new file mode 100644 index 0000000000..1563b6dd93 --- /dev/null +++ b/.ci/atime/bisect-7687.R @@ -0,0 +1,162 @@ +remotes::install_github("tdhock/atime@bisect") +pkg.path <- "~/R/data.table" +Test <- "DT[by] fixed in #4558" +atime::bisect(pkg.path, Test, "Before", "Regression")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 +atime::bisect(pkg.path, Test, "Slow", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 + +Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" +Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Before_Regression" +library(data.table) +(results.wide <- data.table( + csv=Sys.glob(file.path(Test.dir, "csv", "*")) +)[ +, fread(csv), by=csv +][ +, rank := rank(time) +][order(rank)][, let( + Rank = factor(rank, labels=format(time)), + Status = factor(status) +)][]) +(results.long <- melt( + results.wide, + measure.vars=measure(variable, version, sep="."))) + +show.versions <- unique(results.long$version) +details.dt.list <- list() +dot.dt.list <- list() +common.dt.list <- list() +for(result.RData in Sys.glob(file.path(Test.dir, "RData", "*"))){ + (objs <- load(result.RData)) + commit <- sub(".RData", "", basename(result.RData)) + details <- tres.or.status$measurements[ + show.versions, + on="version", + data.table(commit, expr.name, version, N, median, min, max) + ] + common.dt.list[[commit]] <- details[, .( + versions=.N + ), by=N][ + versions==max(versions) + ][.N, data.table(commit, N)] + evers <- unique(details[, .(expr.name, version)]) + details.dt.list[[commit]] <- details + dot.dt.list[[commit]] <- data.table( + commit, + tpred$prediction[evers, on="expr.name"]) +} +(details.dt <- rbindlist(details.dt.list)) +(dot.dt <- rbindlist(dot.dt.list)) +(common.dt <- rbindlist(common.dt.list)) + +limit.dt <- data.table(seconds=tpred$seconds.limit) +library(animint2) +(version.colors <- atime:::default.version.colors) +version.colors[setdiff(unique(dot.dt$version), names(version.colors))] <- "black" +animint( + overview=ggplot()+ + ggtitle("Overview, select commit")+ + theme_bw()+ + geom_tallrect(aes( + xmin=rank-0.5, xmax=rank+0.5, + key=rank, + fill=Status), + color=NA, + data=results.wide)+ + geom_line(aes( + rank, value, color=version, group=version), + data=results.long)+ + facet_grid(variable ~ ., scales="free")+ + theme(axis.text.x=element_text(angle=30, hjust=1))+ + geom_label_aligned(aes( + rank, value, label=version, color=version), + data=results.long[rank==max(rank)], + hjust=0, + alignment="vertical")+ + scale_fill_manual(values=c( + "0"="grey", + "1"="white"))+ + scale_color_manual(values=version.colors)+ + scale_y_continuous("")+ + scale_x_continuous("commit rank over time")+ + geom_tallrect(aes( + xmin=rank-0.5, xmax=rank+0.5), + clickSelects="commit", + alpha=1, + alpha_off=0, + color="black", + color_off=NA, + fill=NA, + data=results.wide), + details=ggplot()+ + ggtitle("Details for selected commit")+ + theme_bw()+ + theme(legend.position="none")+ + theme_animint(width=1000)+ + geom_hline(aes( + yintercept=seconds), + color="grey", + data=limit.dt)+ + geom_text(aes( + 0, seconds*1.1, + label=sprintf( + "time limit = %s seconds", + paste(seconds) + )), + hjust=0, + color="grey50", + data=limit.dt)+ + geom_vline(aes( + xintercept=N, + key=1), + data=common.dt, + color="grey", + showSelected="commit")+ + geom_text(aes( + N, 0, label=sprintf("largest common N=%s", paste(N)), + key=1), + data=common.dt, + hjust=1, + color="grey50", + showSelected="commit")+ + geom_text(aes( + 0, 0, label=commit, + href=paste0("https://github.com/Rdatatable/data.table/commit/", commit), + key=1), + hjust=0, + vjust=0, + data=common.dt, + showSelected="commit")+ + geom_ribbon(aes( + N, ymin=min, ymax=max, + key=version, fill=version, group=version), + showSelected=c("version","commit"), + alpha=0.5, + color=NA, + data=details.dt)+ + geom_line(aes( + N, median, + key=version, color=version, group=version), + showSelected=c("version","commit"), + data=details.dt)+ + geom_point(aes( + N, unit.value, + key=version, color=version), + showSelected=c("version","commit"), + fill="white", + data=dot.dt)+ + geom_label_aligned(aes( + N, unit.value, label=version, + key=version, color=version), + showSelected=c("version","commit"), + alignment="horizontal", + vjust=-0.1, + alpha=0.5, + data=dot.dt)+ + scale_color_manual(values=version.colors)+ + scale_fill_manual(values=version.colors)+ + scale_x_log10()+ + scale_y_log10("seconds"), + duration=list( + commit=1000) +) + From 50e7c3232cf2ef00baafec0d2c5dd0b6c49dcfec Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Fri, 9 Oct 2026 15:35:58 -0400 Subject: [PATCH 08/37] publish --- .ci/atime/bisect-7687.R | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 1563b6dd93..bf8c3c5262 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -50,9 +50,15 @@ for(result.RData in Sys.glob(file.path(Test.dir, "RData", "*"))){ limit.dt <- data.table(seconds=tpred$seconds.limit) library(animint2) -(version.colors <- atime:::default.version.colors) -version.colors[setdiff(unique(dot.dt$version), names(version.colors))] <- "black" -animint( +version.colors <- c( + Slow="violet", + Fast="red", + Regression="violet", + Before="red", + HEAD= "blue") +viz <- animint( + title=paste("Performance testing with git bisect in data.table", basename(Test.dir)), + source="https://github.com/Rdatatable/data.table/pull/7912/files#diff-e7f10716f0ff9f29e3186a43cfed95d970b167dc4d6a92c00b9e0736bf4b05ae", overview=ggplot()+ ggtitle("Overview, select commit")+ theme_bw()+ @@ -66,7 +72,6 @@ animint( rank, value, color=version, group=version), data=results.long)+ facet_grid(variable ~ ., scales="free")+ - theme(axis.text.x=element_text(angle=30, hjust=1))+ geom_label_aligned(aes( rank, value, label=version, color=version), data=results.long[rank==max(rank)], @@ -77,7 +82,9 @@ animint( "1"="white"))+ scale_color_manual(values=version.colors)+ scale_y_continuous("")+ - scale_x_continuous("commit rank over time")+ + scale_x_continuous( + "commit rank over time", + breaks=results.wide$rank)+ geom_tallrect(aes( xmin=rank-0.5, xmax=rank+0.5), clickSelects="commit", @@ -91,7 +98,7 @@ animint( ggtitle("Details for selected commit")+ theme_bw()+ theme(legend.position="none")+ - theme_animint(width=1000)+ + theme_animint(width=500, last_in_row=TRUE)+ geom_hline(aes( yintercept=seconds), color="grey", @@ -119,7 +126,7 @@ animint( color="grey50", showSelected="commit")+ geom_text(aes( - 0, 0, label=commit, + 0, 0, label=substring(commit, 1, 10), href=paste0("https://github.com/Rdatatable/data.table/commit/", commit), key=1), hjust=0, @@ -130,7 +137,7 @@ animint( N, ymin=min, ymax=max, key=version, fill=version, group=version), showSelected=c("version","commit"), - alpha=0.5, + alpha=0.2, color=NA, data=details.dt)+ geom_line(aes( @@ -154,9 +161,13 @@ animint( data=dot.dt)+ scale_color_manual(values=version.colors)+ scale_fill_manual(values=version.colors)+ - scale_x_log10()+ + scale_x_log10("N = number of data")+ scale_y_log10("seconds"), duration=list( commit=1000) ) +viz +if(FALSE){ + animint2::animint2pages(viz, paste0("2026-10-09-performance-bisect-", basename(Test.dir)), chromote_sleep_seconds=3) +} From 305810afff97738d030e312989637471404912f8 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 04:44:30 -0400 Subject: [PATCH 09/37] PR4164 --- .ci/atime/bisect-7687.R | 2 +- .ci/atime/tests.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index bf8c3c5262..41cfc9593d 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -4,8 +4,8 @@ Test <- "DT[by] fixed in #4558" atime::bisect(pkg.path, Test, "Before", "Regression")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 atime::bisect(pkg.path, Test, "Slow", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 -Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Before_Regression" +Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" library(data.table) (results.wide <- data.table( csv=Sys.glob(file.path(Test.dir, "csv", "*")) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index c95915297d..096929cb3e 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -330,6 +330,7 @@ test.list <- atime::atime_test_list( }, Before = "166e0bab317e9d9f4f1844997a315e6482ab5fd9",#a few click of parent up from first commit in PR4164 gets to https://github.com/Rdatatable/data.table/commit/166e0bab317e9d9f4f1844997a315e6482ab5fd9 Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) + PR4164="4aadde8f5a51cd7c8f3889964e7280432ec65bbc", # Merge commit of the PR that causes the regression. Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Fast="master", expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), From fd435f572b1d3831a304bb5bc76f60d94c43ef5e Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 04:46:02 -0400 Subject: [PATCH 10/37] PR4164 --- .ci/atime/bisect-7687.R | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 41cfc9593d..72a9f2389b 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -3,6 +3,7 @@ pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" atime::bisect(pkg.path, Test, "Before", "Regression")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 atime::bisect(pkg.path, Test, "Slow", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 +atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits. Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Before_Regression" Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" From 43bbdf4f6079197fc7a7528040285b831f659827 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 05:21:33 -0400 Subject: [PATCH 11/37] no change bisects --- .ci/atime/bisect-7687.R | 16 +++++++++------- .ci/atime/tests.R | 6 ++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 72a9f2389b..76c87a8175 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -1,12 +1,15 @@ remotes::install_github("tdhock/atime@bisect") pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" -atime::bisect(pkg.path, Test, "Before", "Regression")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 -atime::bisect(pkg.path, Test, "Slow", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 -atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits. +atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 +atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 +atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. +atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#two speed increases between these two commits, bisect finds the larger one: PR7401. +atime::bisect(pkg.path, Test, "PR7401", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Before_Regression" Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" +Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Fast" library(data.table) (results.wide <- data.table( csv=Sys.glob(file.path(Test.dir, "csv", "*")) @@ -52,14 +55,13 @@ for(result.RData in Sys.glob(file.path(Test.dir, "RData", "*"))){ limit.dt <- data.table(seconds=tpred$seconds.limit) library(animint2) version.colors <- c( - Slow="violet", - Fast="red", - Regression="violet", - Before="red", HEAD= "blue") +version.colors[c("Slow", "Regression", "PR4164")] <- "violet" +version.colors[c("Fast", "Before")] <- "red" viz <- animint( title=paste("Performance testing with git bisect in data.table", basename(Test.dir)), source="https://github.com/Rdatatable/data.table/pull/7912/files#diff-e7f10716f0ff9f29e3186a43cfed95d970b167dc4d6a92c00b9e0736bf4b05ae", + out.dir=file.path("bisect-viz", basename(Test.dir)), overview=ggplot()+ ggtitle("Overview, select commit")+ theme_bw()+ diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 096929cb3e..41be26d82d 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -329,9 +329,11 @@ test.list <- atime::atime_test_list( ) }, Before = "166e0bab317e9d9f4f1844997a315e6482ab5fd9",#a few click of parent up from first commit in PR4164 gets to https://github.com/Rdatatable/data.table/commit/166e0bab317e9d9f4f1844997a315e6482ab5fd9 - Regression="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of Slow (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) PR4164="4aadde8f5a51cd7c8f3889964e7280432ec65bbc", # Merge commit of the PR that causes the regression. - Slow = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression + Parent4558="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of PR4558 (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) + PR4558 = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression + Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. + PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", Fast="master", expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), From d9800534288038bbf886d3893382d9ed9e9b809d Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 05:47:47 -0400 Subject: [PATCH 12/37] viz --- .ci/atime/bisect-7687.R | 171 +--------------------------------------- .ci/atime/bisect-viz.R | 168 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 169 deletions(-) create mode 100644 .ci/atime/bisect-viz.R diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 76c87a8175..eca812b103 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -4,173 +4,6 @@ Test <- "DT[by] fixed in #4558" atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. -atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#two speed increases between these two commits, bisect finds the larger one: PR7401. -atime::bisect(pkg.path, Test, "PR7401", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. +atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558. +atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes. -Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Before_Regression" -Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_Slow_Fast" -Test.dir <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Fast" -library(data.table) -(results.wide <- data.table( - csv=Sys.glob(file.path(Test.dir, "csv", "*")) -)[ -, fread(csv), by=csv -][ -, rank := rank(time) -][order(rank)][, let( - Rank = factor(rank, labels=format(time)), - Status = factor(status) -)][]) -(results.long <- melt( - results.wide, - measure.vars=measure(variable, version, sep="."))) - -show.versions <- unique(results.long$version) -details.dt.list <- list() -dot.dt.list <- list() -common.dt.list <- list() -for(result.RData in Sys.glob(file.path(Test.dir, "RData", "*"))){ - (objs <- load(result.RData)) - commit <- sub(".RData", "", basename(result.RData)) - details <- tres.or.status$measurements[ - show.versions, - on="version", - data.table(commit, expr.name, version, N, median, min, max) - ] - common.dt.list[[commit]] <- details[, .( - versions=.N - ), by=N][ - versions==max(versions) - ][.N, data.table(commit, N)] - evers <- unique(details[, .(expr.name, version)]) - details.dt.list[[commit]] <- details - dot.dt.list[[commit]] <- data.table( - commit, - tpred$prediction[evers, on="expr.name"]) -} -(details.dt <- rbindlist(details.dt.list)) -(dot.dt <- rbindlist(dot.dt.list)) -(common.dt <- rbindlist(common.dt.list)) - -limit.dt <- data.table(seconds=tpred$seconds.limit) -library(animint2) -version.colors <- c( - HEAD= "blue") -version.colors[c("Slow", "Regression", "PR4164")] <- "violet" -version.colors[c("Fast", "Before")] <- "red" -viz <- animint( - title=paste("Performance testing with git bisect in data.table", basename(Test.dir)), - source="https://github.com/Rdatatable/data.table/pull/7912/files#diff-e7f10716f0ff9f29e3186a43cfed95d970b167dc4d6a92c00b9e0736bf4b05ae", - out.dir=file.path("bisect-viz", basename(Test.dir)), - overview=ggplot()+ - ggtitle("Overview, select commit")+ - theme_bw()+ - geom_tallrect(aes( - xmin=rank-0.5, xmax=rank+0.5, - key=rank, - fill=Status), - color=NA, - data=results.wide)+ - geom_line(aes( - rank, value, color=version, group=version), - data=results.long)+ - facet_grid(variable ~ ., scales="free")+ - geom_label_aligned(aes( - rank, value, label=version, color=version), - data=results.long[rank==max(rank)], - hjust=0, - alignment="vertical")+ - scale_fill_manual(values=c( - "0"="grey", - "1"="white"))+ - scale_color_manual(values=version.colors)+ - scale_y_continuous("")+ - scale_x_continuous( - "commit rank over time", - breaks=results.wide$rank)+ - geom_tallrect(aes( - xmin=rank-0.5, xmax=rank+0.5), - clickSelects="commit", - alpha=1, - alpha_off=0, - color="black", - color_off=NA, - fill=NA, - data=results.wide), - details=ggplot()+ - ggtitle("Details for selected commit")+ - theme_bw()+ - theme(legend.position="none")+ - theme_animint(width=500, last_in_row=TRUE)+ - geom_hline(aes( - yintercept=seconds), - color="grey", - data=limit.dt)+ - geom_text(aes( - 0, seconds*1.1, - label=sprintf( - "time limit = %s seconds", - paste(seconds) - )), - hjust=0, - color="grey50", - data=limit.dt)+ - geom_vline(aes( - xintercept=N, - key=1), - data=common.dt, - color="grey", - showSelected="commit")+ - geom_text(aes( - N, 0, label=sprintf("largest common N=%s", paste(N)), - key=1), - data=common.dt, - hjust=1, - color="grey50", - showSelected="commit")+ - geom_text(aes( - 0, 0, label=substring(commit, 1, 10), - href=paste0("https://github.com/Rdatatable/data.table/commit/", commit), - key=1), - hjust=0, - vjust=0, - data=common.dt, - showSelected="commit")+ - geom_ribbon(aes( - N, ymin=min, ymax=max, - key=version, fill=version, group=version), - showSelected=c("version","commit"), - alpha=0.2, - color=NA, - data=details.dt)+ - geom_line(aes( - N, median, - key=version, color=version, group=version), - showSelected=c("version","commit"), - data=details.dt)+ - geom_point(aes( - N, unit.value, - key=version, color=version), - showSelected=c("version","commit"), - fill="white", - data=dot.dt)+ - geom_label_aligned(aes( - N, unit.value, label=version, - key=version, color=version), - showSelected=c("version","commit"), - alignment="horizontal", - vjust=-0.1, - alpha=0.5, - data=dot.dt)+ - scale_color_manual(values=version.colors)+ - scale_fill_manual(values=version.colors)+ - scale_x_log10("N = number of data")+ - scale_y_log10("seconds"), - duration=list( - commit=1000) -) -viz - -if(FALSE){ - animint2::animint2pages(viz, paste0("2026-10-09-performance-bisect-", basename(Test.dir)), chromote_sleep_seconds=3) -} diff --git a/.ci/atime/bisect-viz.R b/.ci/atime/bisect-viz.R new file mode 100644 index 0000000000..0b8d8d2a8f --- /dev/null +++ b/.ci/atime/bisect-viz.R @@ -0,0 +1,168 @@ +library(animint2) +library(data.table) +Test.dir.vec <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Fast" +Test.dir.vec <- Sys.glob("bisect/*") +for(Test.dir in Test.dir.vec){ + print(Test.dir) + (results.wide <- data.table( + csv=Sys.glob(file.path(Test.dir, "csv", "*")) + )[ + , fread(csv), by=csv + ][ + , rank := rank(time) + ][order(rank)][, let( + Rank = factor(rank, labels=format(time)), + Status = factor(status) + )][]) + (results.long <- melt( + results.wide, + measure.vars=measure(variable, version, sep="."))) + show.versions <- unique(results.long$version) + details.dt.list <- list() + dot.dt.list <- list() + common.dt.list <- list() + for(result.RData in Sys.glob(file.path(Test.dir, "RData", "*"))){ + (objs <- load(result.RData)) + commit <- sub(".RData", "", basename(result.RData)) + details <- tres.or.status$measurements[ + show.versions, + on="version", + data.table(commit, expr.name, version, N, median, min, max) + ] + common.dt.list[[commit]] <- details[, .( + versions=.N + ), by=N][ + versions==max(versions) + ][.N, data.table(commit, N)] + evers <- unique(details[, .(expr.name, version)]) + details.dt.list[[commit]] <- details + dot.dt.list[[commit]] <- data.table( + commit, + tpred$prediction[evers, on="expr.name"]) + } + (details.dt <- rbindlist(details.dt.list)) + (dot.dt <- rbindlist(dot.dt.list)) + (common.dt <- rbindlist(common.dt.list)) + limit.dt <- data.table(seconds=tpred$seconds.limit) + version.colors <- c( + HEAD= "blue") + vers.dt <- nc::capture_first_vec(Test.dir, ".*_", old="[^_]+", "_", new="[^_]+") + version.colors[vers.dt$old] <- "violet" + version.colors[vers.dt$new] <- "red" + viz <- animint( + title=paste("Performance testing with git bisect in data.table", basename(Test.dir)), + source="https://github.com/Rdatatable/data.table/pull/7912/files#diff-e7f10716f0ff9f29e3186a43cfed95d970b167dc4d6a92c00b9e0736bf4b05ae", + out.dir=file.path("bisect-viz", basename(Test.dir)), + overview=ggplot()+ + ggtitle("Overview, select commit")+ + theme_bw()+ + geom_tallrect(aes( + xmin=rank-0.5, xmax=rank+0.5, + key=rank, + fill=Status), + color=NA, + data=results.wide)+ + geom_line(aes( + rank, value, color=version, group=version), + data=results.long)+ + facet_grid(variable ~ ., scales="free")+ + geom_label_aligned(aes( + rank, value, label=version, color=version), + data=results.long[rank==max(rank)], + hjust=0, + alignment="vertical")+ + scale_fill_manual(values=c( + "0"="grey", + "1"="white"))+ + scale_color_manual(values=version.colors)+ + scale_y_log10("")+ + scale_x_continuous( + "commit rank over time", + breaks=results.wide$rank)+ + geom_tallrect(aes( + xmin=rank-0.5, xmax=rank+0.5), + clickSelects="commit", + alpha=1, + alpha_off=0, + color="black", + color_off=NA, + fill=NA, + data=results.wide), + details=ggplot()+ + ggtitle("Details for selected commit")+ + theme_bw()+ + theme(legend.position="none")+ + theme_animint(width=500, last_in_row=TRUE)+ + geom_hline(aes( + yintercept=seconds), + color="grey", + data=limit.dt)+ + geom_text(aes( + 0, seconds*1.1, + label=sprintf( + "time limit = %s seconds", + paste(seconds) + )), + hjust=0, + color="grey50", + data=limit.dt)+ + geom_vline(aes( + xintercept=N, + key=1), + data=common.dt, + color="grey", + showSelected="commit")+ + geom_text(aes( + N, 0, label=sprintf("largest common N=%s", paste(N)), + key=1), + data=common.dt, + hjust=1, + color="grey50", + showSelected="commit")+ + geom_text(aes( + 0, 0, label=substring(commit, 1, 10), + href=paste0("https://github.com/Rdatatable/data.table/commit/", commit), + key=1), + hjust=0, + vjust=0, + data=common.dt, + showSelected="commit")+ + geom_ribbon(aes( + N, ymin=min, ymax=max, + key=version, fill=version, group=version), + showSelected=c("version","commit"), + alpha=0.2, + color=NA, + data=details.dt)+ + geom_line(aes( + N, median, + key=version, color=version, group=version), + showSelected=c("version","commit"), + data=details.dt)+ + geom_point(aes( + N, unit.value, + key=version, color=version), + showSelected=c("version","commit"), + fill="white", + data=dot.dt)+ + geom_label_aligned(aes( + N, unit.value, label=version, + key=version, color=version), + showSelected=c("version","commit"), + alignment="horizontal", + vjust=-0.1, + alpha=0.5, + data=dot.dt)+ + scale_color_manual(values=version.colors)+ + scale_fill_manual(values=version.colors)+ + scale_x_log10("N = number of data")+ + scale_y_log10("seconds"), + duration=list( + commit=1000) + ) + print(viz) +} + +if(FALSE){ + animint2::animint2pages(viz, paste0("2026-10-09-performance-bisect-", basename(Test.dir)), chromote_sleep_seconds=3) +} From 6190108c0e24757f094b602827fbaae1745b2af7 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 05:49:41 -0400 Subject: [PATCH 13/37] comment --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index eca812b103..195432a627 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -4,6 +4,6 @@ Test <- "DT[by] fixed in #4558" atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. -atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558. +atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes. From c6b88bd401e322017be03205f9393783888dd124 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 06:13:05 -0400 Subject: [PATCH 14/37] Parent5463 --- .ci/atime/bisect-7687.R | 3 ++- .ci/atime/tests.R | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 195432a627..6c6a4e45b7 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -5,5 +5,6 @@ atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent wit atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? -atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes. +atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#should find one small speed increase? +atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes, returns PR7650, but atime plot clearly shows no real change. diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 41be26d82d..4962b2bd7e 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -332,6 +332,7 @@ test.list <- atime::atime_test_list( PR4164="4aadde8f5a51cd7c8f3889964e7280432ec65bbc", # Merge commit of the PR that causes the regression. Parent4558="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of PR4558 (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) PR4558 = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression + Parent5463="052f8da6", # PR5463 is bisect result of PR4164 and Parent7401. Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", Fast="master", From a595e5d28c807957e8f527b832c5ecf640352099 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 06:36:53 -0400 Subject: [PATCH 15/37] 4491 --- .ci/atime/bisect-7687.R | 3 ++- .ci/atime/bisect-viz.R | 2 +- .ci/atime/tests.R | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 6c6a4e45b7..850e66a6a7 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -5,6 +5,7 @@ atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent wit atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? -atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#should find one small speed increase? +atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#expected speed increase, found PR4491. +atime::bisect(pkg.path, Test, "PR4164", "Parent4491")#expected speed increase, atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes, returns PR7650, but atime plot clearly shows no real change. diff --git a/.ci/atime/bisect-viz.R b/.ci/atime/bisect-viz.R index 0b8d8d2a8f..bfa02727a4 100644 --- a/.ci/atime/bisect-viz.R +++ b/.ci/atime/bisect-viz.R @@ -1,7 +1,7 @@ library(animint2) library(data.table) -Test.dir.vec <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Fast" Test.dir.vec <- Sys.glob("bisect/*") +Test.dir.vec <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Parent5463" for(Test.dir in Test.dir.vec){ print(Test.dir) (results.wide <- data.table( diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 4962b2bd7e..e1a56f97b6 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -332,6 +332,7 @@ test.list <- atime::atime_test_list( PR4164="4aadde8f5a51cd7c8f3889964e7280432ec65bbc", # Merge commit of the PR that causes the regression. Parent4558="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of PR4558 (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) PR4558 = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression + Parent4491="3fa8b20435d33b3d4b5c26fd9b0ac14c10b98800", # PR4491 is bisect result of PR4164 and Parent5463. Parent5463="052f8da6", # PR5463 is bisect result of PR4164 and Parent7401. Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", From fcbbd99d13cf8640e56958fa0082b0b78cace823 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 06:58:53 -0400 Subject: [PATCH 16/37] DONE --- .ci/atime/bisect-7687.R | 2 +- .ci/atime/bisect-viz.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 850e66a6a7..8d22369bdf 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -6,6 +6,6 @@ atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#expected speed increase, found PR4491. -atime::bisect(pkg.path, Test, "PR4164", "Parent4491")#expected speed increase, +atime::bisect(pkg.path, Test, "PR4164", "Parent4491")#expected speed increase, found PR4558. DONE. atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes, returns PR7650, but atime plot clearly shows no real change. diff --git a/.ci/atime/bisect-viz.R b/.ci/atime/bisect-viz.R index bfa02727a4..f52a169ef1 100644 --- a/.ci/atime/bisect-viz.R +++ b/.ci/atime/bisect-viz.R @@ -1,7 +1,7 @@ library(animint2) library(data.table) Test.dir.vec <- Sys.glob("bisect/*") -Test.dir.vec <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Parent5463" +Test.dir.vec <- "~/R/data.table/.ci/atime/bisect/DT_by__fixed_in__4558_PR4164_Parent4491" for(Test.dir in Test.dir.vec){ print(Test.dir) (results.wide <- data.table( From d61d44e5352f7bfa1d02448cc5cf6a2874f53382 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 12:07:00 -0400 Subject: [PATCH 17/37] FALSE --- .ci/atime/bisect-7687.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 8d22369bdf..776c573779 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -1,4 +1,6 @@ -remotes::install_github("tdhock/atime@bisect") +if(FALSE){ + remotes::install_github("tdhock/atime@bisect") +} pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 From 0eaee4e32ddb73a9b374621e9240f8fd2c3b8f5f Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 14:01:40 -0400 Subject: [PATCH 18/37] Parent4558 --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 776c573779..00eaa193c6 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -3,7 +3,7 @@ if(FALSE){ } pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" -atime::bisect(pkg.path, Test, "Before", "PR4164")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 +atime::bisect(pkg.path, Test, "Before", "Parent4558")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? From ac0e49f12e172d308a158a9244f09d233a258311 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sat, 10 Oct 2026 15:20:08 -0400 Subject: [PATCH 19/37] bisect 5463_parent7401 --- .ci/atime/bisect-7687.R | 1 + .ci/atime/tests.R | 1 + 2 files changed, 2 insertions(+) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 00eaa193c6..efb22de067 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -10,4 +10,5 @@ atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small spee atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#expected speed increase, found PR4491. atime::bisect(pkg.path, Test, "PR4164", "Parent4491")#expected speed increase, found PR4558. DONE. atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes, returns PR7650, but atime plot clearly shows no real change. +atime::bisect(pkg.path, Test, "PR5463", "Parent7401")#slight speed decrease. diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index e1a56f97b6..be78301bb7 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -334,6 +334,7 @@ test.list <- atime::atime_test_list( PR4558 = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Parent4491="3fa8b20435d33b3d4b5c26fd9b0ac14c10b98800", # PR4491 is bisect result of PR4164 and Parent5463. Parent5463="052f8da6", # PR5463 is bisect result of PR4164 and Parent7401. + PR5463="19b7866112614db53eb3e909c097407d91cd6738", Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", Fast="master", From 37b0ce5c7b3dc6ddf7186c3902d349c38e9d2bdc Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Sun, 11 Oct 2026 10:22:28 -0400 Subject: [PATCH 20/37] 2 --- .ci/atime/tests.R | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index be78301bb7..696cfe4cea 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -453,6 +453,7 @@ test.list <- atime::atime_test_list( # Regression introduced by https://github.com/Rdatatable/data.table/pull/6890 and discussed in https://github.com/Rdatatable/data.table/issues/7404 (grouped by factor). "DT[by] max regression fixed in #7480" = atime::atime_test( + N=2^seq(1, 20), setup = { dt = data.table( id = as.factor(rep(seq_len(N), each = 100L)), From c19e9f3acfad9bd723ec915d57e6b058897dab36 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Mon, 12 Oct 2026 12:27:46 -0400 Subject: [PATCH 21/37] rowwiseDT --- .ci/atime/bisect-7687.R | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index efb22de067..130adf061b 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -3,12 +3,26 @@ if(FALSE){ } pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" -atime::bisect(pkg.path, Test, "Before", "Parent4558")#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 -atime::bisect(pkg.path, Test, "PR4558", "Fast")#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 -atime::bisect(pkg.path, Test, "PR4164", "Fast")#two speed increases between these two commits, bisect finds the larger one: PR7401. -atime::bisect(pkg.path, Test, "PR4164", "Parent7401")#should find one small speed increase in PR4558? Finds PR5463?? -atime::bisect(pkg.path, Test, "PR4164", "Parent5463")#expected speed increase, found PR4491. -atime::bisect(pkg.path, Test, "PR4164", "Parent4491")#expected speed increase, found PR4558. DONE. -atime::bisect(pkg.path, Test, "PR7401", "Fast")#no speed changes, returns PR7650, but atime plot clearly shows no real change. -atime::bisect(pkg.path, Test, "PR5463", "Parent7401")#slight speed decrease. - +library(data.table) +(bisect.dt <- rowwiseDT( + old=, new=, label=, + "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 + "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 + "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. + "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? + "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. + "PR4164", "Parent4491", "PR4558",#expected speed increase, found PR4558. DONE. + "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. + "PR5463", "Parent7401", "TODO"))#slight speed decrease. +for(bisect.i in 1:nrow(bisect.dt)){ + bisect.row <- bisect.dt[bisect.i] + done <- FALSE + while(!done){ + done <- tryCatch({ + bisect.row[, atime::bisect(pkg.path, Test, old, new)] + TRUE + }, error=function(e){ + FALSE + }) + } +} From 3d63649956ef92d04f6429481ffbc877fdd20448 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Mon, 12 Oct 2026 12:29:13 -0400 Subject: [PATCH 22/37] comment-neg --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 130adf061b..999ea29f32 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -12,7 +12,7 @@ library(data.table) "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558",#expected speed increase, found PR4558. DONE. - "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. + #"PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. "PR5463", "Parent7401", "TODO"))#slight speed decrease. for(bisect.i in 1:nrow(bisect.dt)){ bisect.row <- bisect.dt[bisect.i] From 72b254ad610de7f534ea39c84c0add727b81e761 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Mon, 12 Oct 2026 14:04:57 -0400 Subject: [PATCH 23/37] comment --- .ci/atime/bisect-7687.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 999ea29f32..ae8088c11f 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -9,11 +9,11 @@ library(data.table) "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. - "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? - "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. - "PR4164", "Parent4491", "PR4558",#expected speed increase, found PR4558. DONE. + #"PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? #"PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. - "PR5463", "Parent7401", "TODO"))#slight speed decrease. + #"PR5463", "Parent7401", "TODO",#slight speed decrease. + "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. + "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ bisect.row <- bisect.dt[bisect.i] done <- FALSE @@ -26,3 +26,4 @@ for(bisect.i in 1:nrow(bisect.dt)){ }) } } + From 1f48059043bc7026dd6d96cf275fc8d2fb2e4f67 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Mon, 12 Oct 2026 18:57:18 -0400 Subject: [PATCH 24/37] lim0.1 --- .ci/atime/bisect-7687.R | 2 +- .ci/atime/tests.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index ae8088c11f..cdcf3ebe9f 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -19,7 +19,7 @@ for(bisect.i in 1:nrow(bisect.dt)){ done <- FALSE while(!done){ done <- tryCatch({ - bisect.row[, atime::bisect(pkg.path, Test, old, new)] + bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] TRUE }, error=function(e){ FALSE diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 696cfe4cea..968539a186 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -320,6 +320,8 @@ test.list <- atime::atime_test_list( # Test case adapted from https://github.com/Rdatatable/data.table/issues/4200#issuecomment-645980224 which is where the issue was reported. # Fixed in https://github.com/Rdatatable/data.table/pull/4558 "DT[by] fixed in #4558" = atime::atime_test( + N=2^seq(1, 20), + seconds.limit=0.1, setup = { N9 <- as.integer(N * 0.9) d <- data.table( @@ -453,7 +455,6 @@ test.list <- atime::atime_test_list( # Regression introduced by https://github.com/Rdatatable/data.table/pull/6890 and discussed in https://github.com/Rdatatable/data.table/issues/7404 (grouped by factor). "DT[by] max regression fixed in #7480" = atime::atime_test( - N=2^seq(1, 20), setup = { dt = data.table( id = as.factor(rep(seq_len(N), each = 100L)), From 030ff5ec349b444852792a0ed2e7c5e80a124582 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Mon, 12 Oct 2026 18:57:18 -0400 Subject: [PATCH 25/37] lim0.1 --- .ci/atime/bisect-7687.R | 8 ++++---- .ci/atime/tests.R | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index ae8088c11f..777ad3c8bb 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -9,9 +9,9 @@ library(data.table) "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. - #"PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? - #"PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. - #"PR5463", "Parent7401", "TODO",#slight speed decrease. + "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? + "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. + "PR5463", "Parent7401", "TODO",#slight speed decrease. "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ @@ -19,7 +19,7 @@ for(bisect.i in 1:nrow(bisect.dt)){ done <- FALSE while(!done){ done <- tryCatch({ - bisect.row[, atime::bisect(pkg.path, Test, old, new)] + bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] TRUE }, error=function(e){ FALSE diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 696cfe4cea..968539a186 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -320,6 +320,8 @@ test.list <- atime::atime_test_list( # Test case adapted from https://github.com/Rdatatable/data.table/issues/4200#issuecomment-645980224 which is where the issue was reported. # Fixed in https://github.com/Rdatatable/data.table/pull/4558 "DT[by] fixed in #4558" = atime::atime_test( + N=2^seq(1, 20), + seconds.limit=0.1, setup = { N9 <- as.integer(N * 0.9) d <- data.table( @@ -453,7 +455,6 @@ test.list <- atime::atime_test_list( # Regression introduced by https://github.com/Rdatatable/data.table/pull/6890 and discussed in https://github.com/Rdatatable/data.table/issues/7404 (grouped by factor). "DT[by] max regression fixed in #7480" = atime::atime_test( - N=2^seq(1, 20), setup = { dt = data.table( id = as.factor(rep(seq_len(N), each = 100L)), From 38fa2599b5d2b3cb392b716e71f258b3ca929931 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 03:16:53 -0400 Subject: [PATCH 26/37] commint --- .ci/atime/bisect-7687.R | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 777ad3c8bb..f9bd608a9a 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -10,20 +10,12 @@ library(data.table) "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? - "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. - "PR5463", "Parent7401", "TODO",#slight speed decrease. + ## "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. + ## "PR5463", "Parent7401", "TODO",#slight speed decrease. "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ bisect.row <- bisect.dt[bisect.i] - done <- FALSE - while(!done){ - done <- tryCatch({ - bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] - TRUE - }, error=function(e){ - FALSE - }) - } + bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] } From c78b6473ace141b7295268109884e16a56ae1f6e Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 03:17:11 -0400 Subject: [PATCH 27/37] print --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index f9bd608a9a..a98413b4eb 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -15,7 +15,7 @@ library(data.table) "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ - bisect.row <- bisect.dt[bisect.i] + print(bisect.row <- bisect.dt[bisect.i]) bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] } From 0b8b7f126b7ce0b7a2b6b4c55366683cd7d16513 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 05:17:34 -0400 Subject: [PATCH 28/37] neg --- .ci/atime/bisect-7687.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index a98413b4eb..11a4281c4e 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -1,9 +1,11 @@ -if(FALSE){ - remotes::install_github("tdhock/atime@bisect") -} pkg.path <- "~/R/data.table" Test <- "DT[by] fixed in #4558" library(data.table) +if(FALSE){ + remotes::install_github("tdhock/atime@bisect") + atime::bisect(pkg.path, Test, "PR7401", "Fast") +} + (bisect.dt <- rowwiseDT( old=, new=, label=, "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 @@ -16,6 +18,6 @@ library(data.table) "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ print(bisect.row <- bisect.dt[bisect.i]) - bisect.row[, atime::bisect(pkg.path, Test, old, new, reps=1)] + bisect.row[, atime::bisect(pkg.path, Test, old, new)] } From a8e75d2eb6c28b7468f2883844faa47a2b8112ed Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 06:24:46 -0400 Subject: [PATCH 29/37] PR4491 --- .ci/atime/bisect-7687.R | 2 +- .ci/atime/tests.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 11a4281c4e..6e868284fe 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -11,7 +11,7 @@ if(FALSE){ "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. - "PR4164", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? + "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? ## "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. ## "PR5463", "Parent7401", "TODO",#slight speed decrease. "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 968539a186..2c9df7a193 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -335,6 +335,7 @@ test.list <- atime::atime_test_list( Parent4558="6f360be0b2a6cf425f6df751ca9a99ec5d35ed93", #parent of PR4558 (https://github.com/Rdatatable/data.table/commit/ba32f3cba38ec270587e395f6e6c26a80be36be6) PR4558 = "ba32f3cba38ec270587e395f6e6c26a80be36be6", # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/4558) that fixes the regression Parent4491="3fa8b20435d33b3d4b5c26fd9b0ac14c10b98800", # PR4491 is bisect result of PR4164 and Parent5463. + PR4491="85adf09e3463838d547977ae9bc75e3b37f9cbaf", Parent5463="052f8da6", # PR5463 is bisect result of PR4164 and Parent7401. PR5463="19b7866112614db53eb3e909c097407d91cd6738", Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. From 95b8f69befdfbfb1e43783d54f5fa655aecde155 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 06:43:54 -0400 Subject: [PATCH 30/37] pos --- .ci/atime/bisect-7687.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 6e868284fe..dd4734c11e 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -3,7 +3,8 @@ Test <- "DT[by] fixed in #4558" library(data.table) if(FALSE){ remotes::install_github("tdhock/atime@bisect") - atime::bisect(pkg.path, Test, "PR7401", "Fast") + atime::bisect(pkg.path, Test, "PR7401", "Fast") #should error + atime::bisect(pkg.path, Test, "PR4491", "Parent7401") #should find PR5463 } (bisect.dt <- rowwiseDT( @@ -12,7 +13,6 @@ if(FALSE){ "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? - ## "PR7401", "Fast", "",#no speed changes, returns PR7650, but atime plot clearly shows no real change. ## "PR5463", "Parent7401", "TODO",#slight speed decrease. "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. From 7b8475522d1510ba9814d0501fe820d1e52e0d9a Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 07:09:40 -0400 Subject: [PATCH 31/37] finding PR5463 --- .ci/atime/bisect-7687.R | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index dd4734c11e..1cf65a691e 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -12,6 +12,7 @@ if(FALSE){ "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. + "PR4164", "Parent7401", "PR5463", "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? ## "PR5463", "Parent7401", "TODO",#slight speed decrease. "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. From b87d894857b3bb72f7b84b832a46d7ddc75dd0c3 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 12:18:12 -0400 Subject: [PATCH 32/37] comment --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 1cf65a691e..b1c6d664a6 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -15,7 +15,7 @@ if(FALSE){ "PR4164", "Parent7401", "PR5463", "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? ## "PR5463", "Parent7401", "TODO",#slight speed decrease. - "PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. + ##"PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ print(bisect.row <- bisect.dt[bisect.i]) From 86537fc1c9e13e84e6858ac5b19e29f27453fb85 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 13:13:27 -0400 Subject: [PATCH 33/37] largerN --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 2c9df7a193..09df807c2a 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -320,7 +320,7 @@ test.list <- atime::atime_test_list( # Test case adapted from https://github.com/Rdatatable/data.table/issues/4200#issuecomment-645980224 which is where the issue was reported. # Fixed in https://github.com/Rdatatable/data.table/pull/4558 "DT[by] fixed in #4558" = atime::atime_test( - N=2^seq(1, 20), + N=2^seq(1, 30), seconds.limit=0.1, setup = { N9 <- as.integer(N * 0.9) From 22d5e1b665fb7712acb26b23ae145e0de8d3c6d8 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 15:37:35 -0400 Subject: [PATCH 34/37] move up --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index b1c6d664a6..1c9fe778a7 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -9,10 +9,10 @@ if(FALSE){ (bisect.dt <- rowwiseDT( old=, new=, label=, + "PR4164", "Parent7401", "PR5463", "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. - "PR4164", "Parent7401", "PR5463", "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? ## "PR5463", "Parent7401", "TODO",#slight speed decrease. ##"PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. From 79d563bffd613a9f452aae31204d2f169ae4a0cd Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 13 Oct 2026 16:19:37 -0400 Subject: [PATCH 35/37] fix Fast --- .ci/atime/tests.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/tests.R b/.ci/atime/tests.R index 09df807c2a..f6b974f292 100644 --- a/.ci/atime/tests.R +++ b/.ci/atime/tests.R @@ -340,7 +340,7 @@ test.list <- atime::atime_test_list( PR5463="19b7866112614db53eb3e909c097407d91cd6738", Parent7401="20b463c9592c07d05ad2e89a25f84f0b998d6154", # master parent of the PR7401 which caused the recent speedup. PR7401="0216983c51e03e3f61d5e6f08f4ba0c42cceb22c", - Fast="master", + Fast="a3eeb4c0caec51afd66bdf9bbc16817e12a47a40", #master 10 Sept 2026 expr = data.table:::`[.data.table`(d, , max(v1) - min(v2), by = id)), # Issue with sorting again when already sorted, as reported in https://github.com/Rdatatable/data.table/issues/4498 From 958d1c431730f36dcd580ef217f2081b744cd7ac Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Wed, 14 Oct 2026 07:16:24 -0400 Subject: [PATCH 36/37] find PR4491 --- .ci/atime/bisect-7687.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 1c9fe778a7..1e038e92de 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -9,12 +9,12 @@ if(FALSE){ (bisect.dt <- rowwiseDT( old=, new=, label=, + "PR4558", "Parent5463", "PR4491", "PR4164", "Parent7401", "PR5463", "Before", "Parent4558", "PR4164",#returns PR4164, consistent with https://github.com/Rdatatable/data.table/issues/4200#issuecomment-646111420 "PR4558", "Fast", "PR7401",#returns PR7401, consistent with https://github.com/Rdatatable/data.table/issues/7687#issuecomment-4162931822 "PR4164", "Fast", "PR7401",#two speed increases between these two commits, bisect finds the larger one: PR7401. "PR4491", "Parent7401", "PR5463",#should find one small speed increase in PR4558? Finds PR5463?? - ## "PR5463", "Parent7401", "TODO",#slight speed decrease. ##"PR4164", "Parent5463", "PR4491",#expected speed increase, found PR4491. "PR4164", "Parent4491", "PR4558"))#expected speed increase, found PR4558. DONE. for(bisect.i in 1:nrow(bisect.dt)){ From 9ce58b0489cca9b8133098002202384adafcc59e Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Wed, 14 Oct 2026 11:10:03 -0400 Subject: [PATCH 37/37] removedt --- .ci/atime/bisect-7687.R | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/atime/bisect-7687.R b/.ci/atime/bisect-7687.R index 1e038e92de..125a985353 100644 --- a/.ci/atime/bisect-7687.R +++ b/.ci/atime/bisect-7687.R @@ -3,6 +3,7 @@ Test <- "DT[by] fixed in #4558" library(data.table) if(FALSE){ remotes::install_github("tdhock/atime@bisect") + atime::atime_versions_remove("data.table") atime::bisect(pkg.path, Test, "PR7401", "Fast") #should error atime::bisect(pkg.path, Test, "PR4491", "Parent7401") #should find PR5463 }