library(LCpackage)
library(microbenchmark)
print_date()
#> Today is the 18 April of year 2020.
add(3, 4)
#> [1] 7
add_cpp(3, 4)
#> [1] 7

Benchmark

microbenchmark(add(100, 1000), add_cpp(100, 1000))
#> Unit: nanoseconds
#>                expr  min   lq    mean median     uq   max neval
#>      add(100, 1000)  313  347  588.97    436  508.5 14152   100
#>  add_cpp(100, 1000) 1440 1574 1842.33   1690 1779.0 15764   100

The Rcpp code is much slower than the base R code!