Skip to content

Commit ba5926c

Browse files
committed
update timings and add NOTE
1 parent d9159a5 commit ba5926c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

NEWS.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ frollsum(c(1,2,3,Inf,5,6), 2)
3838

3939
For a comprehensive description about all available features see `?froll` manual.
4040

41-
Adaptive `frollmax` has observed to be up to 50 times faster than second fastest solution (data.table self-join using `max` and grouping `by=.EACHI`). Note that important factor in performance is width of the rolling window. Code for the benchmark below has been taken from [this SO answer](https://stackoverflow.com/a/73408459/2490497).
41+
Adaptive `frollmax` has observed to be almost 100 times faster than second fastest solution (data.table self-join using `max` and grouping `by=.EACHI`). Note that important factor in performance is width of the rolling window. Code for the benchmark below has been taken from [this SO answer](https://stackoverflow.com/a/73408459/2490497).
4242
```r
4343
set.seed(108)
44-
setDTthreads(8)
44+
setDTthreads(16)
4545
x = data.table(
4646
value = cumsum(rnorm(1e6, 0.1)),
4747
end_window = 1:1e6 + sample(50:500, 1e6, TRUE),
@@ -58,13 +58,15 @@ microbenchmark::microbenchmark(
5858
times=10, check="identical"
5959
)
6060
#Unit: milliseconds
61-
# expr min lq mean median uq max neval
62-
# baser(x) 5181.36076 5417.57505 5537.2929 5494.73652 5706.2721 5818.6627 10
63-
# sj(x) 4608.28940 4627.57186 4792.4031 4785.35306 4856.4475 5054.3301 10
64-
# frmax(x) 70.41253 75.28659 91.3774 91.40227 102.0248 116.8622 10
65-
# frapply(x) 713.23108 742.34657 865.2524 848.31641 965.3599 1114.0531 10
61+
# expr min lq mean median uq max neval
62+
# baser(x) 3795.27209 4051.33159 4170.51859 4187.30114 4315.97151 4413.3272 10
63+
# sj(x) 2833.27588 2842.76144 2902.32128 2873.51706 2963.72514 2990.0901 10
64+
# frmax(x) 29.81908 33.55922 37.24334 36.04337 42.35755 45.8010 10
65+
# frapply(x) 395.60000 417.02053 474.53025 449.81073 545.89983 563.4593 10
6666
```
6767

68+
As of now, adaptive rolling max has no _on-line_ implemention (`algo="fast"`), it uses a naive approach (`algo="exact"`). Therefore further speed up is still possible if `algo="fast"` gets implemented.
69+
6870
### BUG FIXES
6971

7072
1. Custom binary operators from the `lubridate` package now work with objects of class `IDate` as with a `Date` subclass, [#6839](https://github.com/Rdatatable/data.table/issues/6839). Thanks @emallickhossain for the report and @aitap for the fix.

0 commit comments

Comments
 (0)