[Glass] How to manage large amounts of data ...

James Foster james.foster at gemtalksystems.com
Thu Aug 14 07:59:58 PDT 2014


Hi Marten,

While it would certainly be interesting to do some performance measurements, a Dictionary should be very efficient even when large. The general approach is to take a hash of the key and use it as an offset into a linear collection of small “buckets” that are then searched using a different algorithm. As long as your keys have a good hash function then things ought to be quite fast—probably faster than using an index.

James

On Aug 14, 2014, at 7:01 AM, itlists at schrievkrom.de wrote:

> Assuming I have a large number of objects with a unique key attribute
> (uuid based).
> 
> Normally I use an instance of class Dictionary (or perhaps better:
> StringKeyValueDictionary) to store instances of these objects. The
> initial finding access to these objects are mostly done via its unique
> key attribute.
> 
> So the access to an instance was pretty fast:
> 
> ^aDictionary at: aKey ifAbsent: [ nil ]
> 
> But what happens, if this dictionary is getting very large (say: a
> million of entries) ?
> 
> Is is better to have a different approach then: e.g. a collection with a
> defined index on that unique attribute ?
> 
> 
> Thanks for answering ...
> 
> Marten
> 
> 
> -- 
> Marten Feldtmann
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list