Inefficient code of String.indexOf(String) (original) (raw)
Anubhav Chaturvedi mailforanubhav at gmail.com
Sun Jun 16 10:53:49 UTC 2013
- Previous message: Java 8 has type annotations now; perfect time to add bug detection annotations
- Next message: Inefficient code of String.indexOf(String)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Java 8 has type annotations now; perfect time to add bug detection annotations
- Next message: Inefficient code of String.indexOf(String)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]