Quick Q: Does memory layout (including alignment) matter for performance?—StackOverflow

Save to:
Instapaper Pocket Readability

Quick A: Oh, yeah.

See the nice three-paragaph "highlights" answer to the question:

Does alignment really matter for performance in C++11?

There is an advice in Stroustrup's book to order the members in a struct beginning from the biggest to the smallest. But I wonder if someone has made measurements to actually see if this makes any difference, and if it is worth it to think about when writing code.

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.