Skip to content

Instantly share code, notes, and snippets.

@RyanKung
Last active November 22, 2018 08:39
Show Gist options
  • Save RyanKung/e9fdddfdaff1b687bc494af45aeccc2d to your computer and use it in GitHub Desktop.
Save RyanKung/e9fdddfdaff1b687bc494af45aeccc2d to your computer and use it in GitHub Desktop.
md5 bench test
use md5;
use std::time::SystemTime;
use rayon::prelude::*;
fn main() {
let now = SystemTime::now();
(13200000000 as i64 .. 18900099999 as i64).into_par_iter().map(
|d| {
print!("[{:?}]{} with hash: {:?}\n",
SystemTime::now().duration_since(now).unwrap(),
d,
md5::compute(d.to_string()));
}
).count();
}
@RyanKung
Copy link
Author

edition = "2018"
[dependencies]
md5="0.6.0"
rayon = "1.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment