optimize memory layout of aggregates#11370
Conversation
|
Thanks for your pull request and interest in making D better, @NilsLankila! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11370" |
|
Headers. |
|
Headers ok now |
thewilsonator
left a comment
There was a problem hiding this comment.
Looks good aside the merge conflict
On x86_64, StructDeclaration stood on 569 bytes, now 560 which saves allocation of a small block.
|
conflicts solved |
|
This caused a regression. |
|
bad headers ? |
|
can be caused by the rebase too ? |
|
Yes, bad headers. It could have been avoided if tests are added whenever public fields get moved around. |
Can't say. But they are clearly in the wrong order when comparing C++ and D definitions. |
|
yeah anyway sorry, thanks for the fixup. |
On x86_64, StructDeclaration stood on 569 bytes, now 560, which saves allocation of a small block, simply by reordering fields.
Note that this time the gain is always negligible as you dont have thousands of different struct in a project.
My methodology to test (/usr/bin/time -v) doesnt even show anything tangible.