Measure execution time

Rust

#![allow(unused)]
fn main() {
use std::time::Instant;

let start = Instant::now();
// ...
let duration = start.elapsed();
}

Python

import time

start = time.time()
# ...
duration = time.time() - start