highsource / jaxb2-basics

Useful plugins and tools for JAXB2.
BSD 2-Clause "Simplified" License
108 stars 54 forks source link

HashCode performance plunged at 1.11.1 #120

Closed ksiczek closed 3 years ago

ksiczek commented 3 years ago

Hello.

We have learned, the hard way, that hashCode's implementation from jaxb2-basics-runtime@1.11.1 is much worse than it was at v 0.11.0. For five of our test objects, the difference is

0.11.0 ns/op 1.11.1 ns/op
2.585811 122815.912955
2.621964 21057.894486
2.673620 124189.719586
2.632383 121253.248259
2.677038 356398.245740

I am not sure why we have decided to use 1.11.1 but is it an official version? It is on Maven Central but is not at this project's releases section and there is a newer version with a lower number 0.12.0. Would you mind explaining that and maybe recommend us whether it is worth migrating to 0.12.0 or not?

Thanks in advance,

Karol.

ksiczek commented 3 years ago

It seems that hashCode does not work well for 0.11.0 and returns the same value regardless of the object hence the performance.

ksiczek commented 3 years ago

Ok, I just learned that it is due to the issue #67.