We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vec_assign(x, integer())
Similarly to #1400 I think it would make sense to have a fast path for vec_assign(x, integer())
The motivation is also similar: e.g. when using vec_assign() in a coalesce() like fashion vec_assign(x, is.na(x), 1L).
vec_assign()
coalesce()
vec_assign(x, is.na(x), 1L)
library(rlang) library(vctrs) x <- 0L + 1:10e6 bench::mark( vec_assign = {vec_assign(x, integer(), integer())}, check = FALSE ) #> # A tibble: 1 x 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> #> 1 vec_assign 5.1ms 5.53ms 165. 38.2MB 172.
Created on 2021-06-25 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered:
Thanks for looking into this but we've decided early exits like this are not worth the complications.
Sorry, something went wrong.
vec_slice(x, <vector of only TRUE>)
Successfully merging a pull request may close this issue.
Similarly to #1400 I think it would make sense to have a fast path for
vec_assign(x, integer())
The motivation is also similar: e.g. when using
vec_assign()
in acoalesce()
like fashionvec_assign(x, is.na(x), 1L)
.Benchmark
Created on 2021-06-25 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: