RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v4]
Per Minborg
pminborg at openjdk.org
Mon Jan 23 11:25:06 UTC 2023
On Mon, 23 Jan 2023 10:15:55 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> Very good question. I will take a look at it. A fixed value is inserted in the original var handle so potentially it might improve performance that way too.
>
> No significant performance increase:
>
>
> 2-parameters
> Benchmark Mode Cnt Score Error Units
> PrimitiveFieldSerializationBenchmark.serializeData avgt 8 6.761 ± 0.126 ns/op
> PrimitiveFieldSerializationBenchmark.serializeRecord avgt 8 6.890 ± 0.093 ns/op
>
> 3-parameters
> Benchmark Mode Cnt Score Error Units
> PrimitiveFieldSerializationBenchmark.serializeData avgt 8 6.850 ± 0.074 ns/op
> PrimitiveFieldSerializationBenchmark.serializeRecord avgt 8 6.855 ± 0.057 ns/op
I will remove the extra methods with lesser parameters.
-------------
PR: https://git.openjdk.org/jdk/pull/12076
More information about the core-libs-dev
mailing list