Use all integers if possible. Integer operations are about three times as fast as floating point.

- Choose the fastest integer type that has sufficient range and precision for your calculations.
- Avoid multiple-precision integer types. Operations on them take at least twice as long as the same operation on an integer type native to the underlying CPU.
Avoid mixing data types in expressions. This causes promotions to be inserted between the useful mathematical operations. Defining everything as floating point types may lead to a faster program than mixing integers and floating point.