I'm not sure this is exactly the forum for this sort of question - it
doesn't involve servlets at all... but here's my take on it anyway:
> If I need to locate an entry only rarely, I do a linear
> search of the Vector like this: [linear search snipped]
First of all, since the Vector is already ordered, you can use a binary
search algorithm here... avoid the overhead of setting up a hash table
but still get reasonable search time on a nontrivial sized data set.
Second, if you are going to be iterating over it, you might also want to
use <ducking> an array </ducking> because accessing the members would be
faster that way, rather than going through the Vector interface.
--
Within C++ is a smaller, cleaner language
struggling to get out.
It's called Java.
Thomas Moore
[EMAIL PROTECTED] Home Account
Software.Engineer [EMAIL PROTECTED]
phone://732.462.1880:268 NJ Patterns Group Home Page
employer://Celwave, RF http://members.home.net/twmoore/cjpg
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html