[Rd] Benchmark code, but avoid printing

2015-01-02 Thread Gábor Csárdi
Dear all, I am trying to benchmark code that occasionally prints on the screen and I want to suppress the printing. Is there an idiom for this? If I do sink(tempfile) microbenchmark(...) sink() then I'll be also measuring the costs of writing to tempfile. I could also sink to /dev/null, which

Re: [Rd] Benchmark code, but avoid printing

2015-01-02 Thread Henrik Bengtsson
On Fri, Jan 2, 2015 at 9:02 AM, Gábor Csárdi csardi.ga...@gmail.com wrote: Dear all, I am trying to benchmark code that occasionally prints on the screen and I want to suppress the printing. Is there an idiom for this? If I do sink(tempfile) microbenchmark(...) sink() then I'll be

Re: [Rd] Benchmark code, but avoid printing

2015-01-02 Thread Simon Urbanek
On Jan 2, 2015, at 12:02 PM, Gábor Csárdi csardi.ga...@gmail.com wrote: Dear all, I am trying to benchmark code that occasionally prints on the screen and I want to suppress the printing. Is there an idiom for this? If I do sink(tempfile) microbenchmark(...) sink() then I'll be