Skip to content
Prev 4180 / 21312 Next

[Bioc-devel] C++ code performance issues

On 03/21/2013 11:30 AM, Peter Glaus wrote:
Can you narrow this down to something more reproducible, e.g., a particular call 
that causes problems, including the platform(s) on which you are seeing issues?

Maybe you're running out of memory (because R is holding memory that the command 
line does not access)?

Probably you spend most of your time 'in C' or 'in R', rather than moving 
between them?

You could try, on linux / mac, a cheap C-level guesstimate of where time is 
spent by running under gdb

   R -d gdb
   (gdb) run

and then periodically breaking with cntrl-C and looking where you are

   (gdb) backtrace
    ## stack trace
    (gdb) continue

and comparing the same under the commandline

   > gdb ./bitseq

or doing some more serious profiling as outlines in section 3.4 of 'Writing R 
Extensions"; probably you would start by getting a short reproducible example.

Martin