In Rust High Performance, on page 27, the author wrote:
The problem is that if you are trying to print an integer, for example, a bottleneck appears. That's what happened some time ago to Robert Grosse, and he wrote an article about it. Long story short, he had to force the copying of the integer. How did he do that? Well, it's as simple as creating a scope that will return that integer. Since integers implement Copy, the integer will be copied to the scope and then returned, effectively copying it to the macro:
let my_int = 76_u32; println!("{}", {my_int});
Why does the author claim it is a bottleneck print an integer? Such that it even results in a workaround of creating a new scope for the sole purpose of copying the passed-in integer?
I searched for Robert Grosse but couldn't find the mentioned article.