faster string search options
807580Sep 17 2009 — edited Sep 17 2009Hi
I am an intern at a mobile technology firm assigned the job of enhancing the search performance of a tool, which is coded completely in java. This tool, along with other features basically searches for the substring in a string array by using the string.indexof() method which is very slow, since i am dealing with vast amount of data..
Now the last two weeks all I did was try and understand the massive code. These are the alternatives I came up with. I could do with suggestions about the feasibilities of these ideas.. or any new suggestions are welcome..
1. are there any faster ways instead of string.indexof() that i can use to do my string search?
2. How about replacing this indexof() method with a faster search algorithm? something like boyer-moore for example??
3. will using a the .nio package instead of .io package work???
4. how about completely scrapping this string search and taking in the data from input stream as integer format.. and then doing the comparisons??
thanks
mahima