BobbyAnguelov / Esoterica

Esoterica Engine

Home Page:https://www.esotericaengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Member order optimization

erincatto opened this issue · comments

Consider ordering members based on size: largest to smallest. This often reduces padding thus reducing memory usage and improving cache efficiency. I think I have seen this in a few spots, here is one:

Minor issue.

I'm already doing that using the StructLayout tool. That said I've mostly cared about the runtime code and have been more lax on the debug tools side. In this case though, it doesnt matter how I shift the variables around the memory size is unchanged:

image