{
  library(digest)

  digest_vectorize <- Vectorize(digest, "object")

  digest_sapply_std <- function(vec, algo = c("md5", "sha1", "crc32", "sha256",
      "sha512", "xxhash32", "xxhash64", "murmur32"), serialize = TRUE,
      file = FALSE, length = Inf, skip = "auto", ascii = FALSE,
      raw = FALSE, seed = 0) {
    sapply(vec, digest, algo=algo, serialize=serialize, file=file, length=length, skip=skip, ascii=ascii, raw=raw, seed=seed)
  }

  digest_sapply_explicit <- function(vec, algo = c("md5", "sha1", "crc32", "sha256",
      "sha512", "xxhash32", "xxhash64", "murmur32"), serialize = TRUE,
      file = FALSE, length = Inf, skip = "auto", ascii = FALSE,
      raw = FALSE, seed = 0) {
    sapply(vec, function(x) digest(object=x, algo=algo, serialize=serialize, file=file, length=length, skip=skip, ascii=ascii, raw=raw, seed=seed))
  }

  digest_lapply <- function(vec, algo=c("md5", "sha1", "crc32", "sha256", "sha512", "xxhash32", "xxhash64", "murmur32"), serialize=TRUE, file = FALSE, length = Inf, skip = "auto", ascii = FALSE, raw = FALSE, seed = 0) {
    unlist(lapply(
      vec, digest, algo=algo, serialize=serialize, file=file, length=length, skip=skip, ascii=ascii, raw=raw, seed=seed
    ), use.names=FALSE)
  }

  N.vec_size <- 5e5
  times <- 22

  # x.samp <- sapply(seq(5000), function(x) sample(c(LETTERS, letters), sample(15:200, 1), TRUE) %>% pasteC)
  x.samp <- sapply(seq(N.vec_size), function(x) sample(c(LETTERS, letters), sample(15:200, 1), TRUE) %>% pasteC)
  catn(" ---   CHARACTER STRINGS --- ")
  mbench(times=times, Vectorize=digest_vectorize(x.samp, algo="murmur32"), sapply_standard=digest_sapply_std(x.samp, algo="murmur32"), sapply_explicit=digest_sapply_explicit(x.samp, algo="murmur32"), lapply_unlist=digest_lapply(x.samp, algo="murmur32"))

  x.samp <- sample(1e3:1e9, N.vec_size, TRUE) %>% as.integer
  catn(" ---   INTEGERS --- ")
  mbench(times=times, Vectorize=digest_vectorize(x.samp, algo="murmur32"), sapply_standard=digest_sapply_std(x.samp, algo="murmur32"), sapply_explicit=digest_sapply_explicit(x.samp, algo="murmur32"), lapply_unlist=digest_lapply(x.samp, algo="murmur32"))

  x.samp <- rnorm(N.vec_size, sd=5) * sample(1:1e3, N.vec_size, TRUE)
  catn(" ---   INTEGERS --- ")
  mbench(times=times, Vectorize=digest_vectorize(x.samp, algo="murmur32"), sapply_standard=digest_sapply_std(x.samp, algo="murmur32"), sapply_explicit=digest_sapply_explicit(x.samp, algo="murmur32"), lapply_unlist=digest_lapply(x.samp, algo="murmur32"))
}
