Here's the writeup with examples on the Google profiler tool as applied to an R package that uses RcppArmadillo.
http://pj.freefaculty.org/blog/?p=140 "R package profiling with Google Preftools" I had forgotten until yesterday, but Dirk E. advised me in 2009 to try this out. After having invested a couple of hours in each of these alternatives, I agree the Google perftools works fairly well, certainly better than the others I've tried this week (better than gprof, sprof, oprofile, and valgrind). Here's the payoff picture, the graph from one function to another with time percentages. http://pj.freefaculty.org/blog-attachments/pprof5994.0-LD_PRELOAD.pdf The major unsolved problem is that many of the functions are not displayed with human readable names. I had some limited success with the new oprofile, but I can't make much sense of the output (yet). In case you want to try sprof, forget it (at least on Debian and Ubuntu), for the reasons outlined here: http://pj.freefaculty.org/blog/?p=136 Even after you weave your way through the puzzling sequence of environment commands, it is still impossible to analyze the output file. I also tried valgrind, but with R shared libraries in packages, well, all I can say is "apparently useless for profiling." In the past, I've had treat success with valgrind for analysis of memory usage, but for profiling, well, limited in value, so far as I can tell. In case you wonder, the suggestion that we should try valgrind is in this writeup (http://www.admin-magazine.com/HPC/Articles/HPC-Profiling-Is-the-Key-to-Survival) Found a Nice debate on gprof alternatives: http://stackoverflow.com/questions/1777556/alternatives-to-gprof Its kinda dominated by one big post against gprof and any other compiler I've heard of. :) pj -- Paul E. Johnson Professor, Political Science Assoc. Director 1541 Lilac Lane, Room 504 Center for Research Methods University of Kansas University of Kansas http://pj.freefaculty.org http://quant.ku.edu _______________________________________________ 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