powered by
binary_search(x, v, index=FALSE)
is_element
x <- rnorm(10000) v <- x[500] system.time( b <- binary_search(x,v) ) system.time( b1 <- binary_search(x,v,TRUE) )
Run the code above in your browser using DataLab