Skip to content

Optimization: Pack all structs #192

Description

@Exonorid

Describe the optimization:
Struct padding can take up a lot of space, and the ChunkFeature struct for example has 25% of its memory footprint taken up by padding due to alignment requirements under the default C layout.

Explain why this feature is necessary:
The ESP32 family of CPUs incur no performance penalty for unaligned accesses, so this feature will reduce memory usage with (theoretically) no negative impact on performance.

Are you planning on implementing this yourself? If so, explain the approach you intend to take:
I can implement this myself, which would amount to surrounding the common struct definitions with #pragma pack directives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationIdea for a memory or compute optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions