On Mon, 23 Jan 2023 10:15:55 GMT, Per Minborg <pminb...@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