Guarantee the size is the main purpose.
Those type aren't made for performance issues. They're made to guarantee the integer sizes are the same over various systems.
For example, when you use int32_t
you can be sure the size of it is 32 bits anywhere code compiles, but you're not sure about the size of int
.
The problem is using these guaranteed size types may affect the performance, int_fastX_t
types can reduce this bad effect because they guarantee minimum size.
For example, compiler can use a 32 bit int
for a int_fast16_t
in a 32 bit machine...