Hi,
Profiling shows that 65-70% of the time of my program is spent inside
a single function -- this is not surprising, as it is inside an
optimize call inside a loop (this is a dynamic programming problem).
I would like to speed this up.
The function does very little: has a single argument, evalu
I don't know if this would have an appreciable effect or not but
you could also check whether passing the free variables explicitly
speeds it up so that they don't have to be looked up each time
in the outside environment.
On 11/18/06, Tamas K Papp <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Profiling sh
On Sat, 18 Nov 2006, Tamas K Papp wrote:
> Hi,
>
> Profiling shows that 65-70% of the time of my program is spent inside
> a single function -- this is not surprising, as it is inside an
> optimize call inside a loop (this is a dynamic programming problem).
> I would like to speed this up.
>
> The
I am passing (numeric) arrays to a C function, called with .C. To the
best of my knowledge, I can do this in R by passing it as a vector
(with as.vector) to the .C call.
However, it would be useful to access the array as an array inside C,
ie not have to calculate how array indices (i,j,k) map to