search for: serialize2

Displaying 1 result from an estimated 1 matches for "serialize2".

Did you mean: serialize
2008 Jul 25
1
serialize() to via temporary file is heaps faster than doing it directly (on Windows)
...object directly. This has for instance impact on how fast digest::digest() can provide a checksum. Example: x <- 1:1e7; t1 <- system.time(raw1 <- serialize(x, connection=NULL)); print(t1); # user system elapsed # 174.23 129.35 304.70 ## 5 minutes t2 <- system.time(raw2 <- serialize2(x, connection=NULL)); print(t2); # user system elapsed # 2.19 0.18 5.72 ## 5 seconds print(t1/t2); # user system elapsed # 79.55708 718.61111 53.26923 stopifnot(identical(raw1, raw2)); where serialize2() is serialize():ing to file and reading the results back: ser...