7## load shared libraries with wrapper code
8dyn.load("overhead_1.so")
9dyn.load("overhead_2.so")
11overhead_c_symbol <- getNativeSymbolInfo( "overhead_c" )
12overhead_cpp_symbol <- getNativeSymbolInfo( "overhead_cpp" )
14overhead_c <- function(a,b) .Call( overhead_c_symbol, a, b )
15overhead_cpp <- function(a,b) .Call( overhead_cpp_symbol, a, b )
17## load benchmarkin helper function
18suppressMessages(library(rbenchmark))
20res <- benchmark(overhead_cpp(a,b), overhead_c(a,b),
21 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),