[Rcpp-commits] r2079 - pkg/Rcpp/inst/examples/ConvolveBenchmarks

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 7 16:47:25 CEST 2010


Author: edd
Date: 2010-09-07 16:47:24 +0200 (Tue, 07 Sep 2010)
New Revision: 2079

Modified:
   pkg/Rcpp/inst/examples/ConvolveBenchmarks/exampleRCode.r
Log:
prettified function names a little


Modified: pkg/Rcpp/inst/examples/ConvolveBenchmarks/exampleRCode.r
===================================================================
--- pkg/Rcpp/inst/examples/ConvolveBenchmarks/exampleRCode.r	2010-09-07 13:25:27 UTC (rev 2078)
+++ pkg/Rcpp/inst/examples/ConvolveBenchmarks/exampleRCode.r	2010-09-07 14:47:24 UTC (rev 2079)
@@ -20,19 +20,19 @@
 
 v2 <- .Call("convolve2cpp", a, b)[[1]]
 stopifnot(all.equal(v1, v2))
-RcppClassic <- function(a,b) .Call("convolve2cpp", a, b)
+Rcpp_Classic <- function(a,b) .Call("convolve2cpp", a, b)
 
 v3 <- .Call("convolve3cpp", a, b)
 stopifnot(all.equal(v1, v3))
-RcppNew_std <- function(a,b) .Call("convolve3cpp", a, b)
+Rcpp_New_std <- function(a,b) .Call("convolve3cpp", a, b)
 
 v4 <- .Call("convolve4cpp", a, b)
 stopifnot(all.equal(v1, v4))
-RcppNew_ptrs <- function(a,b) .Call("convolve4cpp", a, b)
+Rcpp_New_ptr <- function(a,b) .Call("convolve4cpp", a, b)
 
 v5 <- .Call( "convolve5cpp", a, b )
 stopifnot(all.equal(v1, v5))
-RcppNew_sugar <- function(a,b) .Call("convolve5cpp", a, b)
+Rcpp_New_sugar <- function(a,b) .Call("convolve5cpp", a, b)
 
 v7 <- .Call("convolve7", a, b)
 R_API_naive <- function(a,b) .Call("convolve7", a, b)
@@ -41,10 +41,10 @@
 suppressMessages(library(rbenchmark))
 bm <- benchmark(R_API_optimised(a,b),
                 R_API_naive(a,b),
-                RcppClassic(a,b),
-                RcppNew_std(a,b),
-                RcppNew_ptrs(a,b),
-                RcppNew_sugar(a,b),
+                Rcpp_Classic(a,b),
+                Rcpp_New_std(a,b),
+                Rcpp_New_ptr(a,b),
+                Rcpp_New_sugar(a,b),
                 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
                 order="relative",
                 replications=10000)



More information about the Rcpp-commits mailing list