Added 'benchmarking' to projecteuler 082 and 083
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::time::Instant;
|
||||
|
||||
use nom::{
|
||||
bytes::streaming::tag,
|
||||
@@ -17,6 +18,7 @@ fn parse_input(input: &str) -> IResult<&str, Vec<Vec<u32>>> {
|
||||
|
||||
fn main() {
|
||||
println!("Hello, this is Patrick");
|
||||
let now = Instant::now();
|
||||
|
||||
let input_text = include_str!("../matrix.txt");
|
||||
let (_input, matrix) = parse_input(input_text).unwrap();
|
||||
@@ -49,4 +51,5 @@ fn main() {
|
||||
);
|
||||
|
||||
println!("The minimal path is: {}", minimal_path.unwrap().1);
|
||||
println!("Executed in {:?}", now.elapsed());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::time::Instant;
|
||||
|
||||
use nom::{
|
||||
bytes::streaming::tag,
|
||||
@@ -17,6 +18,7 @@ fn parse_input(input: &str) -> IResult<&str, Vec<Vec<u32>>> {
|
||||
|
||||
fn main() {
|
||||
println!("Hello, this is Patrick");
|
||||
let now = Instant::now();
|
||||
|
||||
let input_text = include_str!("../matrix.txt");
|
||||
let (_input, matrix) = parse_input(input_text).unwrap();
|
||||
@@ -53,4 +55,5 @@ fn main() {
|
||||
);
|
||||
|
||||
println!("The minimal path is: {}", minimal_path.unwrap().1);
|
||||
println!("Executed in {:?}", now.elapsed());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user