I have heard that it is a bad idea to repeatedly assign a float to an int like this:
float a = 1.0002;
int b = a;
The compiler will make an additional function call to _ftol(). This can really slow a program down. My source is Andre Lamothes “Tricks of the 3D Game Programming Gurus” chapter 16, page 1595. Is it ok to cast an integer to a float like this or will it slow a program down (this type of thing will get called many times each time I render the scene):
int a = 1;
float b = a;
another source: http://www.devx.com/Intel/Article/11541