Rcpp11 / attributes

Standalone implementation of Rcpp attributes.
Other
3 stars 1 forks source link

Speed improvements #28

Open kevinushey opened 10 years ago

kevinushey commented 10 years ago

Although the current implementation of attributes::compileAttributes() is certainly 'fast enough', we're still about half the speed of Rcpp::compileAttributes(). There are surely some low hanging fruit; e.g. using timeit to profile:

plot(timeit(attributes::compileAttributes()))

gives the plot

screen shot 2014-06-22 at 11 23 03 am

I can only imagine some of this slowness is related to e.g. unnecessary repeated reading of files, or lack of vectorization.

romainfrancois commented 10 years ago

Thanks for looking into this.

romainfrancois commented 10 years ago

Which codebase to you use for the benchmarks ?

kevinushey commented 10 years ago

I've been using my own package Kmisc which has a mess of C++ files: https://github.com/kevinushey/Kmisc

I'm not sure how good a job timeit is doing here though -- after removing file existence checks, the rest of the time is actually in .Calls so my (overly conservative, probably slow) C/C++ code is probably the culprit.