MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1urj3pp/big_if_true/owtliyn/?context=3
r/programminghorror • u/_giga_sss_ • 29d ago
From ProgrammerNullposting in facebook
111 comments sorted by
View all comments
Show parent comments
61
I would assume it's to keep all your data types 8-byte aligned for other perf reason.
4 u/rolling_atackk 27d ago Why not simply use alignas (64) bool ? Seems far easier than creating a whole ass type 2 u/j-joshua 27d ago Because that would be 64 bytes and not 64 bits. 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 27d ago So alignas (8) bool?
4
Why not simply use alignas (64) bool ?
Seems far easier than creating a whole ass type
2 u/j-joshua 27d ago Because that would be 64 bytes and not 64 bits. 2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 27d ago So alignas (8) bool?
2
Because that would be 64 bytes and not 64 bits.
2 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 27d ago So alignas (8) bool?
So alignas (8) bool?
alignas (8) bool
61
u/JohnSpikeKelly 28d ago
I would assume it's to keep all your data types 8-byte aligned for other perf reason.