|
16 | 16 |
|
17 | 17 | 2. `cedta()` now returns `FALSE` if `.datatable.aware = FALSE` is set in the calling environment, [#5654](https://github.com/Rdatatable/data.table/issues/5654). |
18 | 18 |
|
| 19 | +3. `base::rev` gains a fast method `frev(x, copy)` for atomic vectors/list, [#5885](https://github.com/Rdatatable/data.table/issues/5885). Thanks to Benjamin Schwendinger for suggesting and implementing. |
| 20 | + |
| 21 | + ```R |
| 22 | + x = sample(2e8) |
| 23 | + microbenchmark::microbenchmark( |
| 24 | + base = rev(x), |
| 25 | + frev_copy = frev(x, copy=TRUE), |
| 26 | + frev_inplace = frev(x, copy=FALSE), |
| 27 | + times = 10L, |
| 28 | + unit = "s" |
| 29 | + ) |
| 30 | + # Unit: seconds |
| 31 | + # expr min lq mean median uq max neval cld |
| 32 | + # base 1.376 1.397 1.864 1.544 1.917 4.274 10 a |
| 33 | + # frev_copy 0.529 0.591 0.769 0.659 0.727 1.351 10 b |
| 34 | + # frev_inplace 0.064 0.065 0.066 0.066 0.067 0.070 10 c |
| 35 | + ``` |
| 36 | + |
19 | 37 | ## NOTES |
20 | 38 |
|
21 | 39 | 1. `transform` method for data.table sped up substantially when creating new columns on large tables. Thanks to @OfekShilon for the report and PR. The implemented solution was proposed by @ColeMiller1. |
|
319 | 337 |
|
320 | 338 | 41. `tables()` is faster by default by excluding the size of character strings in R's global cache (which may be shared) and excluding the size of list column items (which also may be shared). `mb=` now accepts any function which accepts a `data.table` and returns a higher and better estimate of its size in bytes, albeit more slowly; e.g. `mb = utils::object.size`. |
321 | 339 |
|
322 | | -42. `base::rev` gains a fast method `frev(x, copy)` for atomic vectors/list, [#5885](https://github.com/Rdatatable/data.table/issues/5885). Thanks to Benjamin Schwendinger for suggesting and implementing. |
323 | | -
|
324 | | - ```R |
325 | | - x = sample(2e8) |
326 | | - microbenchmark::microbenchmark( |
327 | | - base = rev(x), |
328 | | - frev_copy = frev(x, copy=TRUE), |
329 | | - frev_inplace = frev(x, copy=FALSE), |
330 | | - times = 10L, |
331 | | - unit = "s" |
332 | | - ) |
333 | | - # Unit: seconds |
334 | | - # expr min lq mean median uq max neval cld |
335 | | - # base 1.376 1.397 1.864 1.544 1.917 4.274 10 a |
336 | | - # frev_copy 0.529 0.591 0.769 0.659 0.727 1.351 10 b |
337 | | - # frev_inplace 0.064 0.065 0.066 0.066 0.067 0.070 10 c |
338 | | - ``` |
339 | | -
|
340 | 340 | ## BUG FIXES |
341 | 341 |
|
342 | 342 | 1. `by=.EACHI` when `i` is keyed but `on=` different columns than `i`'s key could create an invalidly keyed result, [#4603](https://github.com/Rdatatable/data.table/issues/4603) [#4911](https://github.com/Rdatatable/data.table/issues/4911). Thanks to @myoung3 and @adamaltmejd for reporting, and @ColeMiller1 for the PR. An invalid key is where a `data.table` is marked as sorted by the key columns but the data is not sorted by those columns, leading to incorrect results from subsequent queries. |
|
0 commit comments