The median_rcpp() function is written in C++ and is multiple times faster than the R base function median().
> r_norm<- rnorm(1000000)
> system.time(median(r_norm))
user system elapsed
0.040 0.004 0.044
> system.time(median_rcpp(r_norm))
user system elapsed
0.011 0.000 0.011
> median(r_norm)
[1] -0.001214243
> median_rcpp(r_norm)
[1] -0.001214243