JMH: Pad using a mix of bytes and longs

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jmh

      Padding needs to be done in a way that avoids leaving gaps in the object layout. Current strategy lays out 256 byte fields, which then becomes a significant part of generated code. To reduce code we could consider padding using a mix of byte and long fields.

      A PoC which assumes 16 bytes + 240 bytes in longs would be sufficient reduces generated JMH code size (both compiled and source) by ~20%.

      This might be of interest in light of JDK-8345302

            Assignee:
            Claes Redestad
            Reporter:
            Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: