On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote:
> uses fgl;
>
> type
> TIntMap = specialize TFPGMap; //Maps Int --> Int
I compared the performance of this generics map to a simple integer list.
The map was much slower and it also ate huge amouts of memory, > 1.5 GB.
Strange. My data
On Sunday 22 August 2010 18:51:21 Andreas Schneider wrote:
> Afaik, inserting items into a sorted List is done via InsertSort, which is
> the fastest way (O(n))to go (IMHO), so you do /not/ have to resort the
> list.
True. I could optimize the current implementation a little. Now I insert and
the
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,
On Sun, 22 Aug 2010 18:36:23 +0300, "Juha Manninen (gmail)"
wrote:
> My prog has a big amount of integers, thats why an integer list is not
> enough.
> A binary search from a sorted list is pretty fast but the problem is
that
> I am adding items to the list and it must be sorted after every
addi
Den 22-08-2010 17:36, Juha Manninen (gmail) skrev:
On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote:
uses fgl;
type
TIntMap = specialize TFPGMap; //Maps Int --> Int
Thanks. I tried that. However the class name, TFPGMap, turned out to be
misleading. It inherits from TFPSMap which
On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote:
> uses fgl;
>
> type
> TIntMap = specialize TFPGMap; //Maps Int --> Int
Thanks. I tried that. However the class name, TFPGMap, turned out to be
misleading. It inherits from TFPSMap which inherits from TFPSList, which is a
list, not a
On Sun, 22 Aug 2010 17:05:21 +0300, "Juha Manninen (gmail)"
wrote:
> Hi
>
> Is there an implementation of a hash map where the keys are integers. It
> is
> needed when the integers are too big for a lookup array.
> I only need check the existence of keys so the data type is not
important.
> Abo
Hi
Is there an implementation of a hash map where the keys are integers. It is
needed when the integers are too big for a lookup array.
I only need check the existence of keys so the data type is not important.
About like this:
var
Len: integer;
SeenLen: TIntMap; // or whatever the type is c