mod verb; #[macro_use] extern crate criterion; use criterion::{Criterion, black_box}; use verba::adjective as A; use verba::verb::{Verb}; use verba::verb as V; use verb::*; fn benchmark_create_first_conjugation_noun(c: &mut Criterion) { c.bench_function("create first conjugation regular noun", |b| b.iter(|| { V::Regular::new("laudō".to_string(), "laudāre".to_string(), "laudāvī".to_string(), "laudātum".to_string()) })); } fn benchmark_first_first_singular_present_active_indicative(c: &mut Criterion) { let verb = create_laudare(); c.bench_function("create first conjugation regular noun", move |b| b.iter(|| { verb.conjugate(V::Person::First, V::Number::Singular, V::Tense::Present, V::Voice::Active, V::Mood::Indicative) })); } criterion_group!(create, benchmark_create_first_conjugation_noun); criterion_group!(first_singular_present_active_indicative, benchmark_first_first_singular_present_active_indicative); criterion_main!(create, first_singular_present_active_indicative);