3 ms·
Data alignment: Why is it so important?
- MichaelCrawford 12y ago"Writing Cross-Platform Software: Getting Started" is largely about alignment: http://www.warplife.com/tips/code/portable/getting-started/ http://www.warplife.com/tips/code/portable/getting-started/ For years it was the top hit for "cross-platform software development". After a while it wasn't anymore. Eventually I looked into why; I found dozens of articles on the same topic, all with the term "getting started" in their titles. Some people would be angry. I was very pleased. I don't really want credit for my work; what I want is for problems to go away.
- MichaelCrawford 12y agoIt's not that data really _has_ to be aligned. It's that computers are easier and cheaper to design and manufacture if they require data alignment. Consider that it would be straightforward for today's 64-bit CPUs to permit 64-bit values to have one-byte alignment. There's all kinds of ways to implement that in hardware and software, but to do so requires extra circuitry, that would require larger silicon dies, there would be a greater failure rate at the fab and so on.