[PATCH] D60765: [ELF] Place SectionPiece::{Live,Hash} bit fields together

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 02:11:00 PDT 2019


MaskRay added a comment.

In D60765#1471271 <https://reviews.llvm.org/D60765#1471271>, @ruiu wrote:

> By the way I think your finding that this struct can be 12 bytes long instead of 16 bytes long is pretty interesting. Previously, we found that making this struct as small as possible does matter in terms of performance perhaps due to memory locality. So, shaving off 4 bytes from this might make a noticeable difference in speed. Do you want to try? (If not I'll do that sometime in the future.)


I tested it https://reviews.llvm.org/differential/diff/195689/ Making `SectionPiece` 12 bytes has some negative impact on the performance (likely due to extra `OutputSec` packing/unpacking instructions). So it isn't worth to do that.

Before: 17.177 +- 0.133 seconds time elapsed  ( +-  0.77% )
After: 17.279 +- 0.171 seconds time elapsed  ( +-  0.99% )


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60765/new/

https://reviews.llvm.org/D60765





More information about the llvm-commits mailing list