On Wed, 25 Feb 2026 20:08:19 GMT, Patrick Strawderman <[email protected]> wrote:

>> Hmm, I checked the code of that deprecated constructor. If the compiler can 
>> recognize `count == ascii.length` then it should be able to fold this code; 
>> maybe the compiler is too stupid. Have you verified the performance results 
>> in a benchmark?
>
>> Hmm, I checked the code of that deprecated constructor. If the compiler can 
>> recognize `count == ascii.length` then it should be able to fold this code; 
>> maybe the compiler is too stupid. Have you verified the performance results 
>> in a benchmark?
> 
> I did not run benchmarks, just saw that the constructor copies the array 
> (obviously since it's public), and that we use JLA in other places to avoid 
> the copy.
> 
>> Turns out this is necessary per https://bugs.openjdk.org/browse/JDK-8364418
> 
> Yep I saw that as well, which is why I thought this would be beneficial.

@kilink Are you going to update the PR with the performance data and a summary 
of the testing that you have done? Are the benchmarks for Base64.Encoder in 
test/micro sufficient or will this PR propose to add more benchmarks?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29920#issuecomment-3964695824

Reply via email to