Inefficient code of String.indexOf(String) (original) (raw)

Anubhav Chaturvedi mailforanubhav at gmail.com
Sun Jun 16 10:53:49 UTC 2013


Hello,

I have recently started to explore the source code and am new to the open source community. I observed that in String.class within java.lang , the indexOf method, line 1715, uses the bruteforce approach when it comes to string matching. This method is used by the contains(CharSequence) method. There are a number of algorithms that can perform the task more efficiently.

I would like to bring the required changes and needed your advice on this.

-- Regards, Anubhav Chaturvedi

Birla Institute of Technology & Science, Pilani KK Birla Goa Campus +91-9637399150



More information about the core-libs-dev mailing list