[Charlotte.PM] find index of array element
drewhead at drewhead.org
drewhead at drewhead.org
Wed Mar 23 10:22:59 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> > Though Drew's point about scalability is good to remember, I hardly
> > think you're going to have any issues with scalability until your arrays
> > get over 100 elements. Until then, grepping through an array may be
> > faster than using a hash. Anyone care to write up that benchmark?
> >
> With fast computers and virtually unlimited memory, I think the array would
> have to be in the several hundred or low thousands to be noticeably slow. I
> do agree though that parsing the whole list in general is not the best
> approach. I tried "exiting" the grep process in the logic above, but there
> isn't a way to do it, so it will parse the whole list.
I find that I get into trouble not with how big the list is, but by how
many times I end up processing it. It's easy to do this when you try to
build modularily. :)
Grepping through even a large list once probally still leaves your
bottleneck at the interperter.
- --
Drew Dowling Drewhead http://www.drewhead.org
drewhead at drewhead.org | | WWW / \ Alpha Phi Omega
Concord, North Carolina | | Nimat / \ Gamma Lambda
CLEMSON UNIVERSITY ALUMNI | | Apatschin /_____\
TIGER BAND! | VGAP4 Hosting at http://vgap.drewhead.org
-----BEGIN PGP SIGNATURE-----
Comment: Public key available at http://www.drewhead.org
iD8DBQFCQbP48J7U7yHE638RAoOuAJ9By/7FaDEo4/kZ7UgQea8b2E5iLACfSnYJ
XBuBdP+iZueqqhYUnb+Cbro=
=wAkn
-----END PGP SIGNATURE-----
More information about the charlotte
mailing list