search for: n_gc

Displaying 6 results from an estimated 6 matches for "n_gc".

Did you mean: _gc
2018 Jun 08
4
Subsetting the "ROW"s of an object
...neration in the timing. I see: > > arr <- array(rnorm(2^22),c(2^10,4,4,4)) > i <- seq(1,length = 10, by = 100) > > bench::mark( > arr[i, TRUE, TRUE, TRUE], > arr[i, , , ] > ) > #> # A tibble: 2 x 1 > #> expression min mean median max n_gc > #> <chr> <bch:t> <bch:t> <bch:tm> <bch:tm> <dbl> > #> 1 arr[i, TRUE,? 7.4?s 10.9?s 10.66?s 1.22ms 2 > #> 2 arr[i, , , ] 7.06?s 8.8?s 7.85?s 538.09?s 2 > > So not a huge difference, but it's there. Fun...
2018 Jun 08
3
Subsetting the "ROW"s of an object
> On Jun 8, 2018, at 10:37 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > > Also the TRUEs cause problems if some dimensions are 0: > > > matrix(raw(0), nrow=5, ncol=0)[1:3 , TRUE] > Error in matrix(raw(0), nrow = 5, ncol = 0)[1:3, TRUE] : > (subscript) logical subscript too long OK. But this is easy enough to handle. > > H. > > On
2018 Jun 08
0
Subsetting the "ROW"s of an object
...; >> arr <- array(rnorm(2^22),c(2^10,4,4,4)) >> i <- seq(1,length = 10, by = 100) >> >> bench::mark( >> arr[i, TRUE, TRUE, TRUE], >> arr[i, , , ] >> ) >> #> # A tibble: 2 x 1 >> #> expression min mean median max n_gc >> #> <chr> <bch:t> <bch:t> <bch:tm> <bch:tm> <dbl> >> #> 1 arr[i, TRUE,? 7.4?s 10.9?s 10.66?s 1.22ms 2 >> #> 2 arr[i, , , ] 7.06?s 8.8?s 7.85?s 538.09?s 2 >> >> So not a huge difference, but it...
2018 Sep 21
1
Bias in R's random integers?
...ot so good since we often have to get a second random number: > bench::mark(orig = sample.int(m, 1000000, replace = TRUE), + new = sample_int(m, 1000000, replace = TRUE), + check = FALSE) # A tibble: 2 x 14 expression min mean median max `itr/sec` mem_alloc n_gc n_itr <chr> <bch:t> <bch:t> <bch:t> <bch> <dbl> <bch:byt> <dbl> <int> 1 orig 8.15ms 8.67ms 8.43ms 10ms 115. 3.82MB 4 52 2 new 25.21ms 25.58ms 25.45ms 27ms 39.1 3.82MB 2 18 # ... with 5 m...
2018 Jun 08
0
Subsetting the "ROW"s of an object
...sion timing mechnaism, and included the index generation in the timing. I see: arr <- array(rnorm(2^22),c(2^10,4,4,4)) i <- seq(1,length = 10, by = 100) bench::mark( arr[i, TRUE, TRUE, TRUE], arr[i, , , ] ) #> # A tibble: 2 x 1 #> expression min mean median max n_gc #> <chr> <bch:t> <bch:t> <bch:tm> <bch:tm> <dbl> #> 1 arr[i, TRUE,? 7.4?s 10.9?s 10.66?s 1.22ms 2 #> 2 arr[i, , , ] 7.06?s 8.8?s 7.85?s 538.09?s 2 So not a huge difference, but it's there. Hadley -- http://hadley.nz
2018 Sep 20
5
Bias in R's random integers?
On 9/20/18 1:43 AM, Carl Boettiger wrote: > For a well-tested C algorithm, based on my reading of Lemire, the unbiased > "algorithm 3" in https://arxiv.org/abs/1805.10941 is part already of the C > standard library in OpenBSD and macOS (as arc4random_uniform), and in the > GNU standard library. Lemire also provides C++ code in the appendix of his > piece for both this and