[fpc-pascal] Hashmap for integers

Juha Manninen (gmail) juha.manninen62 at gmail.com
Sun Aug 22 18:10:30 CEST 2010


On Sunday 22 August 2010 18:45:04 Jeppe Johansen wrote:
> I don't think the name map is misleading. It does exactly what a map
> does. It maps a type Key to another type Value. A list maps an
> integer(index) to a type Value The search is of course based on a list.
> Hash tables, as far as I know, are usually only profitable when you have
> a large number of insertions on keys that take a long time to compare

... take a long time to compare and to insert. Yes, I have that.
Your comment about map definition is valid. "Map" doesn't define the 
implementation, "hashmap" would define it.


> I don't think there's a generic hash table for FPC. So I'm sure many
> could benefit from it if you implemented it :)
> 
> There's a string based hash table in contnrs.pp

Let's see :-)

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100822/4d2390fc/attachment.html>


More information about the fpc-pascal mailing list