// comment or /* comment */my_file.hMY_CONSTANTmy_function()my_varg_global_varint* my_pointer (pointer as part of type)1 2 3 4 5 6 7 8 9 10 | |
1 2 3 4 5 6 7 8 9 10 | |
1 | |
typedef struct my_struct_t my_struct_t
instead of
struct my_struct_t
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 6 7 8 9 10 11 | |
#include <stddef.h> // NULL1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Always use i++ and not ++i unless absolutely necessary. Let the compiler optimize.
Use LP64 data model (u64 = unsigned long int = unsigned long long int).
1 | |
u32 by default & countersu64 is native but 2x more space -> more cache misssize_t or uint_fast32_tu64 only if need more space1 2 3 4 5 6 7 8 9 10 11 12 13 | |
This is very controversial, no one seems to agree...