HomePhabricator

Merge #8330: Structure Packing Optimizations in C{,Mutable}Transaction

Description

Merge #8330: Structure Packing Optimizations in C{,Mutable}Transaction

Summary:
37495e0d8 Reorder C{,Mutable}Transaction for better packing (Jeremy Rubin)

Pull request description:

These commits revise the layout of a few key classes to eliminate padding, eliminating useless memory overhead.

-This reduces CTransaction from 96 bytes to 88 bytes

Tree-SHA512: 91d1fec363edebbb1f1a5b98142c767511e99d3be857148a76e31cc512c9ab3d153083fa6b46b6407974d3b88de984b436c33e8606fbb2b273d74c825195aa17

Backport of Core PR8330
https://github.com/bitcoin/bitcoin/pull/8330/files

Test Plan:

make check
gdb bitcoind
gdb> print sizeof(CTransaction)
  # Before patch: 96
  # After patch: 88
gdb> print sizeof(CMutableTransaction)
  # Before patch: 64
  # After patch: 56

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3700

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 23 2019, 18:51
jasonbcoxCommitted on Jul 24 2019, 17:23
jasonbcoxPushed on Jul 24 2019, 20:00
Reviewer
Restricted Project
Differential Revision
D3700: Merge #8330: Structure Packing Optimizations in C{,Mutable}Transaction
Parents
rSTAGINGc314457a3fdb: Give an error and exit if there are unknown parameters
Branches
Unknown
Tags
Unknown