On 8/27/12 4:27 PM, Douglas Bates wrote:

Dirk is trying to point out that the two calls are using the same
mechanism.  All that the inline package does is wrap the process of
compiling, linking and dynamically loading the C++ function.
Executing a function compiled this way is exactly the same as
executing a function compiled separately.

One way they could differ is in optimization level specified
on the compiler.

Benchmarking a function like this only once is liable to be unreliable
because the current state of the garbage collection and heap
allocation can change running times.  It is better to run the function
a couple of times before benchmarking.

This can depend on the use case.

Running the same process multiple times can lead to
disk data caching or even memory data caching, leading
to overestimates of speed in real-life situations where
the data's not cached.

The other thing that can happen is that two approaches
have different latencies and throughputs.  One may
be slow to start, but fast to run.  Another may be
fast to start, but relatively slow to run.  (An example
is the total time to compile + run at different optimization
levels and data sizes.)

- Bob

_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to