Kristofer Karlsson's patch notes that on 64-bit platforms struct commit is 80 bytes, 8 of them padding: 4 between .object and .date and 4 at the tail after .index. Moving .index into the hole after .object brings the size to 72 bytes with no padding, which he says means 10% less memory for every commit allocated and no change in behaviour. He measured peak RSS of git rev-list --all over an internal monorepo with about 4.5 million commits. On platforms where 8-byte members need only 4-byte alignment, such as i386, both layouts are already padding-free, so nothing changes there.
Derrick Stolee thanked him for the measurements and said the change looks obviously correct. He believes the only order-critical requirement is that the object struct stay first, so a commit can be cast to an object.
Karlsson agreed that this is an important invariant because nothing enforces it at compile time. He tried moving "object" to the end of the struct: it builds without warnings but fails at runtime, with git log reporting an unknown object and git commit segfaulting. He suggested a BUILD_ASSERT_OR_ZERO on offsetof in init_commit_node(), and the same for trees, blobs and tags.
He also listed the struct's size history from x86_64 builds, which shows it moving between 56 and 80 bytes since 2018 as fields were added and reordered.
Junio Hamano pointed out that the comment above the struct already says its size matters for full-repo walks and recommends commit-slabs for new data, but that this did not prevent growth. He welcomed Karlsson raising it, even as a discussion starter, and said others might think of better ways to force people to measure struct size.