On 14.10.2014 19:32, Stanimir Simeonoff wrote:
> Hi,
> 
> This is an unrelated issue, yet is there any reason for the inner loop
> of equals to be written in such a (confusing) way?
> 
>             if (n == anotherString.value.length) {
>                 char v1[] = value;
>                 char v2[] = anotherString.value;
>                 int i = 0;
>                 while (n-- != 0) {
>                     if (v1[i] != v2[i])
>                         return false;
>                     i++;
>                 }
>                 return true;
>             }
> 
> instead of just "for (int i=0;i<n;i++) if (v1[i]!=v2[i]) return false;"

I think nobody just cares enough. Submit a patch for this?

The String.equals implementation is still intrinsified by C2 anyhow.

-Aleksey.


Reply via email to