On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote:
> A small optimization to reduce the write operations of trimAndCompress
Marked as reviewed by liach (Reviewer).
-
PR Review: https://git.openjdk.org/jdk/pull/21227#pullrequestreview-2360639076
On Sat, 28 Sep 2024 17:15:43 GMT, Abdelhak Zaaim wrote:
> We can improve performance by avoiding repeated array access in the loop.
> Instead of accessing types[i] multiple times, we cache it in a local
> variable. Here's the optimized version `for (int i = 0; i < count; i++) {
> Type current
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote:
> A small optimization to reduce the write operations of trimAndCompress
I saw trimAndCompress in the flame graph of the profile, so I made this
optimization. Avoiding write operations here is a very small optimization and
will not have a si
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote:
> A small optimization to reduce the write operations of trimAndCompress
Does this bring a speed up in the interpreter or compiled code like C2? Indeed
the category 2 long/double primitive types appear rarely, and the majority of
methods won
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote:
> A small optimization to reduce the write operations of trimAndCompress
I think there's no significant performance impact with this change, or it's
negligible, because the condition is replaced by an assignment. While the
condition check wo
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote:
> A small optimization to reduce the write operations of trimAndCompress
We can improve performance by avoiding repeated array access in the loop.
Instead of accessing types[i] multiple times, we cache it in a local variable.
Here's the opti
A small optimization to reduce the write operations of trimAndCompress
-
Commit messages:
- optimize trimAndCompress
Changes: https://git.openjdk.org/jdk/pull/21227/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21227&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8