On Fri, 11 Feb 2022 17:04:14 GMT, XenoAmess <d...@openjdk.java.net> wrote:
>> Performance is a lesser issue. Given all of the other computation that >> occurs to populate the map, this computation is in the noise. It is also >> likely that with more instructions to fetch and execute and a possible >> branch, the integer check is slower. >> With current hardware, the long divide dominates the cost. Addition is >> almost free. >> >> Code maintainability is more important; keep the source code simple and >> concise. > > @RogerRiggs > so you recommend `(int) Math.min(((m.size() * 4L + 2L) / 3L), > Integer.MAX_VALUE)`? OK then, changed it. > please review again, thanks! Works for me. Thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/7431