search for: footc

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

Did you mean: foot
2013 May 23
0
Code compilation: Drop certain statements in a function before calling it multiple times?
...stem.time(for (k in 1:1e5) fooT()); > tT/t user system elapsed 0.6635514 NaN 0.6605505 I am aware of the 'compiler' package, which is great, but as far as I understand the above speed up when dropping statements still applies; > fooC <- compiler::cmpfun(foo); > fooTC <- compiler::cmpfun(fooT); > tC <- system.time(for (k in 1:1e5) fooC()); > tTC <- system.time(for (k in 1:1e5) fooTC()); > tTC/tC user system elapsed 0.6521739 NaN 0.6400000 Thanks, Henrik PS. The same idea of compilation applies when you make heavy use of asse...