Re: [PATCH 05/16] system_data_types.7: Add int_fastN_t family of types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2020-10-01 13:07, Jonathan Wakely wrote:
[...]
+Notes:
+Some of these types may be optimized for size
+instead of raw performance.

I'm not sure what this tells me as a programmer. What does "raw
performance" means exactly? The text above says it's "the fastest",
but then it says "may be optimized for size". I don't know how to
interpret this. Is it fast or is it small, or something else? Is it
optimized for small size? Natural word size? Cacheline size?

I prefer the phrasing of the caveats in the C and POSIX standards
which just say it might not be fastest for all purposes.

How about "Where there is no single type that is fastest for all
purposes, the implementation may choose any type with the required
signedness and at least the minimum width."

I don't see anything in this man page saying that the <stdint.h> types
are all typedefs, rather than new types that are distinct from the
standard integer types. That seems like useful information.


Hi Jonathan,

I wasn't sure about how to word it.

In theory, they should be the fastest types; just that.
But then, for some reason, GCC decided that
int_fast8_t should be int8_t instead of int64_t,
because when using arrays of int_fast8_t,
it will create smaller arrays, which will be faster (less cache, etc.).

(I remember having read that a long time ago, but I don't remember the source, or if it's the actual reason).

How would you word that?

Thanks,

Alex



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux