Skip to content

Reduce Binary Size by Removing <typename Uint> from int_writer #1778

Closed
@kammce

Description

Current Situation

Current class template parameters for int_writer:

template <typename OutputIt, typename Char, typename UInt> struct int_writer {}

Proposal

Removing <typename UInt> from the structure template parameters. This would eliminate a few of the template instances generated of the int_writer structure. Simply replacing the Uint with uint64_t showed a 2476 byte reduction for the following:

  • Compiler: arm-none-eabi-gcc
  • Processor: cortex-m3
  • Optimization level: -Os -fno-lto
  • float/double/long double all disabled

What do you all think? I'm thinking of either using the largest data size or something along those lines in order to eliminate this template parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions