14 signatures <- lapply( expressions, function(.) signature( x_ = "numeric", y_ = "numeric", n_ = "integer" ) )
15 bodies <- lapply( expressions, function(.){
17 int n = as<int>( n_ ) ;
18 NumericVector x(x_), y(y_), z(x.size()) ;
19 for( int i=0; i<n; i++){
26 fx <- cxxfunction( signatures, bodies, plugin = "Rcpp" )
29 x <- runif( 100000, min = 1, max = 100)
30 y <- runif( 100000, min = 1, max = 100)
31 # resolving the dyn lib once
32 invisible( lapply( fx, function(f){ f( x, y, 1L) } ) )
34 # t( sapply( fx, function(f){
35 # system.time( f( x, y, 10000 ) )