From csardi.gabor at gmail.com  Fri Jan  2 18:02:57 2015
From: csardi.gabor at gmail.com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Fri, 2 Jan 2015 12:02:57 -0500
Subject: [Rd] Benchmark code, but avoid printing
Message-ID: <CABtg=KmgV-6QEffrGc4HzOSUM-jvE3ExHFB1KefAgv16S=+oGA@mail.gmail.com>

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 is probably fast, but that is not
portable.

Is there a better solution? Is writing to a textConnection() better?

Thanks, Best,
Gabor



[Rd] Benchmark code, but avoid printing
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=