inefficient indexof when String has one length

Otávio Gonçalves de Santana otaviojava at java.net
Mon Apr 28 13:30:00 UTC 2014


link:
https://dl.dropboxusercontent.com/u/16109193/open_jdk/index_of_with_char.zip


On Mon, Apr 28, 2014 at 10:25 AM, Otávio Gonçalves de Santana <
otaviojava at java.net> wrote:

>
> link:
> https://dl.dropboxusercontent.com/u/16109193/open_jdk/index_of_with_char.zip
>
>
> On Mon, Apr 28, 2014 at 4:42 AM, Paul Sandoz <paul.sandoz at oracle.com>wrote:
>
>> On Apr 27, 2014, at 2:22 PM, Claes Redestad <claes.redestad at oracle.com>
>> wrote:
>> > Possibly a few bytes in static class footprint, sure. Maybe this is
>> something javac should optimize (javap on some trivial examples suggests
>> this doesn't happen) rather than trying to root out all suboptimal cases,
>> especially since there are bound to be a lot more code out there using
>> similar patterns?
>> >
>>
>> While javac can and perhaps should be smarter in certain cases like this
>> i am still supportive of this change in the JDK esp. so if it is something
>> trivially detectable by IDEs; it's low-hanging fruit.
>>
>> Paul.
>>
>
>
>
> --
> Atenciosamente.
>
> Otávio Gonçalves de Santana
>
> blog:     http://otaviosantana.blogspot.com.br/
> twitter: http://twitter.com/otaviojava
> site:     http://www.otaviojava.com.br
> (11)     98255-3513
>
>


-- 
Atenciosamente.

Otávio Gonçalves de Santana

blog:     http://otaviosantana.blogspot.com.br/
twitter: http://twitter.com/otaviojava
site:     http://www.otaviojava.com.br
(11)     98255-3513



More information about the core-libs-dev mailing list