You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/performance.Rmd
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The simulation was performed on `MacBook Air 2020 (M1 Chip, ARM, 8GB RAM)`, with
27
27
28
28
We mainly test the performance of `double` and `float` data type. The dimensions for both arrays are `100x100x100x100`. Both arrays are around `800MB` in native R. This is because R does not have float precision. However, while `double` array occupies `800MB` space on the hard disk, `float` array only uses half size (`400MB`).
29
29
30
-
```{r setup}
30
+
```{r setup, eval = FALSE}
31
31
library(filearray)
32
32
33
33
options(digits = 3)
@@ -69,7 +69,7 @@ Writing along margins refer to something like `x[,,,i] <- v` (along the last mar
@@ -260,7 +260,7 @@ The file array indexing is close to handling in-memory arrays in R!
260
260
261
261
### 3. Random access
262
262
263
-
```{r}
263
+
```{r, eval = FALSE}
264
264
# access 50 x 50 x 50 x 50 sub-array, with random indices
265
265
idx1 <- sample(1:100, 50)
266
266
idx2 <- sample(1:100, 50)
@@ -287,26 +287,26 @@ Random access could be faster than base R (also much less memory!)
287
287
288
288
Collapse calculates the margin sum/mean. Collapse function in `filearray` uses single thread. This is because the bottle-neck often comes from hard-disk accessing speed. However, it is still faster than native R, and is more memory-efficient.
The `dipsaus` package uses multiple threads to collapse arrays in-memory. It is `7~8x` as fast as base R. File array is `1~2x` as fast as base R. Both `dipsaus` and `filearray` have little memory over-heads.
310
+
The `ravetools` package uses multiple threads to collapse arrays in-memory. It is `7~8x` as fast as base R. File array is `1.5~2x` as fast as base R. Both `ravetools` and `filearray` have little memory over-heads.
0 commit comments