borisssmidtCET commented on PR #14597: URL: https://github.com/apache/kafka/pull/14597#issuecomment-1840520823
> Thanks for the PR. There are a number of changes in this PR - which ones actually made a difference to the numbers? Some of them are a bit questionable. 1. The main performance boost was from the `A.hashcode() != B.hashcode()` check. 2. Then the acl change to an array significantly improved the performance since it avoided boolean boxing/unboxing and the nested Seq iterator. 3. Then the Set change in the AclAuthorizer.scala which was called often in the inner loop. Then the performance became harder to gain and this results in a bit more questionable optimizations. Which actually came out of the benchmarks. - enum comparison speed had a memory alignment issue and comparing by code was just faster in general. - improving the string compare performance for USER_TYPE by sharing the same reference. this might not have been that significant. I only committed changes which actually resulted in performance improvements. I tried to change the enum to a 'flag' type with the values `1, 2, 8, 16, 32` but this didn't make any difference. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org