valepakh commented on PR #7914: URL: https://github.com/apache/ignite-3/pull/7914#issuecomment-4197758618
> I'm ok with the changes and `int hash = 31 + ....` pattern. But I'm really confused with the argumentation, guys. > > Imho, engineer must dive into details; changes must be reasonable; performance must be proved; rules shouldn't be just for rules. Why don't we have the rules to avoid using streams or loops over Iterable? they also creates a garbage.... My reasoning was that accidentally using `Objects.hash` is hot path is really easy, and it's not immediately obvious that it will create additional garbage allocations. That's why I added a PMD rule, which in turn required all of the usages to be removed. I didn't bother proving the performance since this change simply eliminates objects' array allocations from this method altogether. Well, I actually did test it, but in a broader context and in a synthetic benchmarks, which showed the decrease of allocations count, but, again, this is obvious and the numbers greatly depend on the specific code path taken. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
