Given the following Rust program:fn main() {    let mut reader = io::stdin();    for line in reader.lock().lines() {        match line {            Ok(l) => print!({}, l),            Err(_) => continue,        }    }}yes | program achieves 1.04MiB/s throughput, according to pv. The trivial C program below, which I fully realize does less, gives me a throughput of 141MiB/s.int main() {    int c;    while((c=getchar()) != EOF)        putchar(c);}How do I go about finding out what's keeping the Rust version from being faster? While I would appreciate if you just told me what to change to make it faster, I'm far more interested in how to find out what needs to be changed.Edit: I tried changing lines() to chars() in the Rust version, to approximate the C version better, but it didn't seem to make any difference.
How can I find out why this Rust program to echo lines from stdin is slow?
performance;io;rust