似乎uint32_t
比uint_fast32_t
更普遍(我意识到这是轶事证据).不过,这似乎与我的直觉背道而驰.
几乎总是当我看到一个实现使用uint32_t
时,它真正想要的是一个整数,可以容纳高达4294967295的值(通常是65535和4294967295之间的一个更低的界限).
It seems weird to then use uint32_t
, as the 'exactly 32 bits' guarantee is not needed, and the 'fastest available >= 32 bits' guarantee of uint_fast32_t
seem to be exactly the right idea. Moreover,
while it's usually implemented, uint32_t
is not actually guaranteed to exist.
那么,为什么uint32_t
人会更受欢迎呢?它只是更为人所知,还是有技术优势?