inefficient indexof when String has one length

Tom Schindl tom.schindl at bestsolution.at
Fri May 30 18:51:16 UTC 2014


On the same topic but still a bit different shouldn't indexOf(String)
check for the size and call indexOf(char) when the length is 1, same for
indexOf(String,int)?

Tom

On 26.04.14 11:56, Otávio Gonçalves de Santana wrote:
> When a String has length just one, could be replaced by equivalent
> character literals, gaining some performance enhancement.
> 




More information about the core-libs-dev mailing list