Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

faster string search options

807580Sep 17 2009 — edited Sep 17 2009
Hi

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2009
Added on Sep 17 2009
4 comments
247 views