paleolimbot commented on pull request #11652:
URL: https://github.com/apache/arrow/pull/11652#issuecomment-967346491
I benchmarked it too...the difference is very small:
``` r
# remotes::install_github("apache/arrow/r#11652")
library(arrow, warn.conflicts = FALSE)
library(dplyr, warn.conflicts = FALSE)
df <- RecordBatch$create(integers = 1:1e7, doubles = as.numeric(1:1e7))
bench::mark(
df %>% mutate(integers %/% 2L) %>% collect(),
df %>% mutate(doubles %/% 2L) %>% collect(),
check = FALSE
)
#> # A tibble: 2 × 6
#> expression min median `itr/sec`
mem_alloc
#> <bch:expr> <bch:tm> <bch:tm> <dbl>
<bch:byt>
#> 1 df %>% mutate(integers%/%2L) %>% collect() 26.1ms 26.6ms 36.4
162MB
#> 2 df %>% mutate(doubles%/%2L) %>% collect() 24.8ms 25.8ms 38.2
191MB
#> # … with 1 more variable: gc/sec <dbl>
```
<sup>Created on 2021-11-12 by the [reprex
package](https://reprex.tidyverse.org) (v2.0.1)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]