> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> On Mar 24, 2007, at 2:58 PM, Dr Gerard Hammond wrote:
>
>> I couldn't agree more John. The speed of dictionaries is great but
>> the syntax is awfully confusing.
If you like dictionary speed... the ElfDataDictionary is around 3 -
5x faster than RB's, for the MacBookPro.
Mine is case sensitive, which may be a problem or a benefit depending
on your code.
More importantly, mine does a whole lot more than RB's dictionary
does. For a start, you can use it with the ElfData class which is
very well optimised for most operations. For example, this tiny bit
of code can't be done nearly as fast in RB, because RB doesn't have
the speed saving concepts, yet this is so simple code:
fi = new ElfDataFields( data ) // moves through the data per line,
whether CR, LF, or CRLF
//or even mixed lines in the same file
dict = new ElfDataDictionary
While fi.MoveNext
dict.HasKey( fi ) = true
wend
With RB, you'd have to use split, which is also much slower than
ElfDataFields, by about 3x, on the MacBookPro.
On the PC, it seems to be 5-8x faster... I guess the PC compiler is
better than gcc for MacOSX :(
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>