dk2k commented on PR #9838: URL: https://github.com/apache/camel/pull/9838#issuecomment-1501807670
@orpiske I suspect some ambiguity here. It's Object.equals(Object) which I changed in this PR. And it Objects.equals(Object, Object) introduced in java 11 - I didn't change these calls. Oracle loves such questions in Java SE exams. Dedicated new benchmark: https://gist.github.com/dk2k/505226619b28a693041c1197b427dea4 Sample timings: time for Class.equals(Class) 52 time for Objects.equals(Class, Class) 11 time for Class == Class 8 time for Class.equals(Class) 90 time for Objects.equals(Class, Class) 9 time for Class == Class 8 time for Class.equals(Class) 68 time for Objects.equals(Class, Class) 9 time for Class == Class 6 time for Class.equals(Class) 89 time for Objects.equals(Class, Class) 9 time for Class == Class 7 So, I think the proposed changes are still relevant. Objects.equals() can be considered an option as well -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org