Skip to content

Instantly share code, notes, and snippets.

@ryanlecompte
Created August 13, 2013 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanlecompte/6223733 to your computer and use it in GitHub Desktop.
Save ryanlecompte/6223733 to your computer and use it in GitHub Desktop.
md5 timing
val text = scala.util.Random.alphanumeric.take(200).mkString
scala> th.pbench { DigestUtils.md5Hex(text.getBytes("UTF-8")) }
Benchmark (5242860 calls in 7.201 s)
Time: 1.231 us 95% CI 1.192 us - 1.270 us (n=20)
Garbage: 91.17 ns (n=244 sweeps measured)
res8: String = ae4c94bd6787e2ba4b5402fefaf71d7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment