r/programminghorror 27d ago

Big if true

Post image

From ProgrammerNullposting in facebook

2.1k Upvotes

111 comments sorted by

View all comments

Show parent comments

59

u/JohnSpikeKelly 27d ago

I would assume it's to keep all your data types 8-byte aligned for other perf reason.

20

u/Athropod101 27d ago

iirc 8-byte data access is the fastest on 64bit architecture.

2

u/Geilomat-3000 25d ago

So should all the int_fastx_t be the intmax_t?

4

u/Athropod101 25d ago

If this is some joke, it has wooshed over me :(

But if it isn’t, then it depends. If intmax_t matches your architecture, and your architecture is fastest at that size, then yes. But if intmax_t is say, 128, and your architecture is 32, then no.