1 quote_benchmark::run_quote_benchmark!(_); 2 3 mod benchmark { 4 macro_rules! benchmark { 5 (|$ident:ident| $quote:expr) => { 6 use proc_macro2::{Ident, Span}; 7 8 pub fn quote() -> proc_macro2::TokenStream { 9 let $ident = Ident::new("Response", Span::call_site()); 10 $quote 11 } 12 }; 13 } 14 15 pub(crate) use benchmark; 16 } 17 18 use benchmark::benchmark; 19 20 mod lib; 21 mod timer; 22 main()23fn main() { 24 timer::time("non-macro", lib::quote); 25 } 26