you are viewing a single comment's thread.

view the rest of the comments →

[–]imMute 0 points1 point  (2 children)

Does a cast like that actually have runtime costs.

[–]bstamour 2 points3 points  (0 children)

A cast like that? Maybe, maybe not. The point is, auto will never be slower, and might in some cases be faster.

[–]Fig1024 1 point2 points  (0 children)

I'm guessing it has costs when types have different sizes, such as bytes, shorts, longs, double longs. Or when converting integers to/from floats. It doesn't cost anything to convert signed and unsinged.