Use lexical-size to detect binary size of numeric routines
mainThe lexical-size utility is used to measure the binary size of lexical's numeric conversion routines. It works by comparing the size of specific routines against a baseline.
To ensure the compiler does not optimize out the routines being measured, the utility uses I/O to consume input. To avoid measurement noise from parsing or formatting the binary sizes themselves, all inputs are read as strings and all outputs are written as usize using casts.
For float formatters, note that the parsers often account for the majority of the total binary size. To minimize the overhead of parsers during measurement, bytes are read via a raw pointer.
use std::io::BufRead;
pub fn main() {
println!("{}", std::io::stdin()
.lock()
.lines()
.next()
.unwrap()
.unwrap()
.trim()
.len()
);
}