RFR: 8339132: Make DirectCodeBuilder write through without allocating instruction objects

Claes Redestad redestad at openjdk.org
Wed Aug 28 07:52:19 UTC 2024


On Wed, 28 Aug 2024 01:49:21 GMT, Chen Liang <liach at openjdk.org> wrote:

> Make `DirectCodeBuilder` write instructions actually directly without allocating extra objects. This speed up a lot of simple Class-File building cases that never go through intermediate transforms.

This seem to work great. A reduction on all relevant startup and footprint metrics. -26 classes on `StringConcatStartup`, for example.

Perhaps the code changes could be reduced somewhat if `DirectCodeBuilder::writeBytecode(Opcode)` et.c. returned `DirectCodeBuilder`.

-------------

Marked as reviewed by redestad (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20738#pullrequestreview-2265439168


More information about the core-libs-dev mailing list