Skip to content
Snippets Groups Projects

[GeometryType] Clean up storage

Merged Steffen Müthing requested to merge feature/clean-up-geometrytype-storage into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • What's the status? Can we merge? Shall this go into 2.6 (GeometryType is rather deep down)?

  • Martin Nolte added 1 commit

    added 1 commit

    • 5f2396cd - [GeometryType] Clean up storage

    Compare with previous version

  • Martin Nolte resolved all discussions

    resolved all discussions

  • I remove the spurious line breaks, keeping the coding style. As nobody opposed, I'm going to merge this to master.

    @andreas.dedner: Should this go into the release?

  • Martin Nolte enabled an automatic merge when the pipeline for 5f2396cd succeeds

    enabled an automatic merge when the pipeline for 5f2396cd succeeds

  • merged

  • Martin Nolte mentioned in commit 1eb68a62

    mentioned in commit 1eb68a62

  • Please register or sign in to reply
    Loading