Closed Bug 1417028 Opened 2 years ago Closed 2 years ago
VMFunctions are allocated statically and we currently have 263 of them. We can easily save some KB: * VMFunction::name_ is only used in TraceLogging code so we can #ifdef it. * The fields can be reordered by size to minimize wasted space. * Some enums can have explicit uint8_t storage. On 64-bit opt, this shrinks VMFunction from 72 bytes to 40 bytes, so it saves 32 * 263 bytes (~8.2 KB). On 32-bit opt, this shrinks VMFunction from 52 bytes to 32 bytes, so it saves 20 * 263 bytes (~5.1 KB).
Attachment #8928130 - Flags: review?(nicolas.b.pierron)
(In reply to Jan de Mooij [:jandem] from comment #0) > * VMFunction::name_ is only used in TraceLogging code so we can #ifdef it. This might save some KBs as well, since we no longer have to store the names in the binary.
Attachment #8928130 - Flags: review?(nicolas.b.pierron) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/365135d6f7cc Shrink VMFunction size. r=nbp
You need to log in before you can comment on or make changes to this bug.