Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #795

Re: For..Each vs For..Next with Collections

From "Farnsworth" <nospam@nospam.com>
Newsgroups comp.lang.basic.visual.misc
Subject Re: For..Each vs For..Next with Collections
Date 2012-02-25 17:13 -0500
Organization Aioe.org NNTP Server
Message-ID <jibmf4$559$1@speranza.aioe.org> (permalink)
References <jiblhc$pfa$1@dont-email.me>

Show all headers | View raw


This was discussed before. Collections are implemented as linked list, and 
when you use an Index, it has to walk from the start each time you refer to 
an item by its Index. If you use a Key, it's faster because it's using 
something like a sorted hash table to find the information, unless the 
Collection being indexed contains very small number of items, in which case 
it doesn't take much time to walk through it all.

http://en.wikipedia.org/wiki/Linked_list
http://en.wikipedia.org/wiki/Hash_table

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

For..Each vs For..Next with Collections GS <gs@somewhere.net> - 2012-02-25 16:57 -0500
  Re: For..Each vs For..Next with Collections "Farnsworth" <nospam@nospam.com> - 2012-02-25 17:13 -0500
    Re: For..Each vs For..Next with Collections GS <gs@somewhere.net> - 2012-02-25 17:27 -0500
  Re: For..Each vs For..Next with Collections GS <gs@somewhere.net> - 2012-02-26 17:06 -0500

csiph-web