search for: 7fa53847dcd8

Displaying 3 results from an estimated 3 matches for "7fa53847dcd8".

2018 Apr 29
1
Result of 'seq' doesn't use compact internal representation
...e of function >> 'seq.default', seq(1,n) produces 1:n. What is going on? > > It looks like it is related to using compiled or interpreted code: > > > library(gtools) > > seq2 <- unByteCode(seq.default) > > .Internal(inspect(seq.default(1,10))) > @7fa53847dcd8 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... > > .Internal(inspect(seq2(1,10))) > @7fa537fa0bf0 13 INTSXP g0c0 [NAM(3)]? 1 : 10 (compact) > > Duncan Murdoch > >> >>> h <- seq.default >>> environment(h) <- .GlobalEnv >>> library(compiler)...
2018 Apr 29
2
Result of 'seq' doesn't use compact internal representation
> .Internal(inspect(1:10)) @300e4e8 13 INTSXP g0c0 [NAM(3)] 1 : 10 (compact) > .Internal(inspect(seq(1,10))) @3b6e1f8 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... > system.time(1:1e7) user system elapsed 0 0 0 > system.time(seq(1,1e7)) user system elapsed 0.05 0.00 0.04 It seems that result of function 'seq' doesn't use compact
2018 Apr 29
0
Result of 'seq' doesn't use compact internal representation
...l representation. However, looking at the code of function 'seq.default', seq(1,n) produces 1:n. What is going on? It looks like it is related to using compiled or interpreted code: > library(gtools) > seq2 <- unByteCode(seq.default) > .Internal(inspect(seq.default(1,10))) @7fa53847dcd8 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... > .Internal(inspect(seq2(1,10))) @7fa537fa0bf0 13 INTSXP g0c0 [NAM(3)] 1 : 10 (compact) Duncan Murdoch > >> h <- seq.default >> environment(h) <- .GlobalEnv >> library(compiler) >> enableJIT(0) > [1] 3 >&g...