Earlier quoted context omitted.
>In general, you might be better off always using long unless there is a specific reason not to I don't agree. That's trading off useful cache for almost invisible micro optimizations. As a general rule, it's always better to use the smallest size possible.
I phrase it as "might be" since I realize it's controversial, but I think that rule is outdated. Yes, having a large static array would be a fine specific reason to use the smallest size possible. But what would be the benefit when you are dealing with the argument to a function in an example like this? Most of the time the argument starts in a register, is passed in a register, and returned in a register. Using a sm…
Anyway, unnecessary conversions mostly go away when you use link time optimizations (fwhole-program or flto in gcc).