[apluslist] Re: Dictionaries

Steven H. Rogers steve at shrogers.com
Thu Apr 22 07:29:37 EDT 2004


Thanks John. 

Potentially the dictionaries I'm thinking about could be quite large.  
As a learning exercise for A+, I'm planning to write an inverted index 
package as described by Kimberly Burchett (see 
http://www.kimbly.com/code/invidx/ ).  As I feared, slotfillers seem 
more suitable for relatively small data collections.  I'm now thinking 
that contexts would be better for large dictionaries.

Regards,
Steve
//////////////////////////////
John.Mizel at morganstanley.com wrote:

>Hi Steve,
>
>Symbols are stored internally in hash table and are represented as
>unique integral values (C pointers), but a slotfiller is just a
>nested object.  How large is the dictionary?  Consider the following:
>
>     eab{x}:(x¨' ')/x
>     sfû(>¡"a",¡eab¡î¡É1000; <¡É1000)
>     time 1000 do `a500Øsf
> 0 0 0
>     sfû(>¡"a",¡eab¡î¡É10000; <¡É10000)
>     time 1000 do `a5000Øsf
> 10 0 10
>     sfû(>¡"a",¡eab¡î¡É100000; <¡É100000)
>     time 1000 do `a50000Øsf
> 100 0 100
>     sfû(>¡"a",¡eab¡î¡É1000000; <¡É1000000)
>     time 1000 do `a500000Øsf
> 1220 0 1210
>     time 1000 do `a1Øsf
> 0 0 0
>     time 1000 do `a999999Øsf
> 2420 0 2420
>
>Regards,
>John
>
>
>  
>
>>Date: Tue, 20 Apr 2004 17:48:43 -0500
>>From: "Steven H. Rogers" <steve at shrogers.com>
>>Subject: [apluslist] Dictionaries
>>To: apluslist at aplusdev.net
>>Message-ID: <4085A8CB.8010703 at shrogers.com>
>>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>>Dictionaries are very useful data structures with efficient hash table
>>based implementations Python and K.  Slotfiller seems to be the closest
>>analog in A+, with the pick function used for access.
>>
>>Is this hash table based, more like an association list, or something
>>else entirely?
>>
>>Is it suitable for large dictionaries or indexes?
>>
>>Is there a complementary function to pick for adding a name value pair
>>to a slotfiller?
>>
>>Regards,
>>Steve
>>
>>------------------------------
>>
>>_______________________________________________
>>apluslist mailing list
>>apluslist at aplusdev.net
>>http://aplusdev.net/mailman/listinfo/apluslist
>>
>>End of apluslist Digest, Vol 3, Issue 7
>>***************************************
>>
>>
>>    
>>
>
>This communication is intended for the addressee(s) and may contain
>confidential and legally privileged information.  We do not waive
>confidentiality or privilege by mistransmission.  If you have received
>this communication in error, any use, dissemination, printing or
>copying is strictly prohibited; please destroy all electronic and
>paper copies and notify the sender immediately.
>_______________________________________________
>apluslist mailing list
>apluslist at aplusdev.net
>http://aplusdev.net/mailman/listinfo/apluslist
>
>
>  
>


-- 
Steven H. Rogers, Ph.D., steve at shrogers.com
Weblog: http://shrogers.com/zope/reflections
"Beauty is not in the eye of the beholder - 
it is in the eye of the maintainer." - Joe Armstrong



More information about the apluslist mailing list