Fixed point processing: what is the difference between uint16_t and uint_fast16_t?

O_O picture O_O · Feb 10, 2011 · Viewed 8.1k times · Source

I have a 16 bit fixed point processor and I want to do fixed point processing with it. I'm looking for the correct datatype to use for unsigned 16 bit ints..

My question is: what is the difference between a uint16_t and uint_fast16_t? (These are included in the stdint.h.) Is uint_fast16_t better since it is faster??

Thanks!!

Answer

Sven picture Sven · Feb 10, 2011

uint16_t is an unsigned 16-bit integer. uint_fast16_t is the fastest available unsigned integer with at least 16 bits.