Skip to content

[GeometryType] Clean up storage

Steffen Müthing requested to merge feature/clean-up-geometrytype-storage into master

This patch removes the packed bitfield used to store both the dimension and the none flag in a single byte. This optimization does not change anything about the size of GeometryType as a whole, because it would be 5 bytes even with the optimization and the C++ ABI (at least on 64-bit platforms) automatically rounds that up to 8 bytes, so we can just as easily let both the flag and the dimension have a full byte of their own.

This also improves the code generated by both GCC and Clang quite a bit. In order to further improve matters, I reordered the member variables and put the topologyId_ variable last.

Merge request reports