Subject: Re: indexing capabilty of swi-pl

From: Pascal Vaillant <[email-masked]>
Date: Sat, 27 Nov 1999 23:10:44 +0000 (GMT)

On Sat, 30 Oct 1999, Jan Wielemaker wrote:

> > * Wich of this methods do you think is faster to access a dictionary,
> >    entry(KeyValue,....KeyInfos....)   (about 5.000 entries):
> >           - put entries as they are in the internal DB of Prolog (with
> >             KeyValue as first argument, relaying on SWI-PL first arg
> >             indexing;
> >           - put entries in a B-tree managed by Prolog.
> > 
> This depends on the number of clauses, but using large sets the choice
> is always a hash-table.  Try to avoid as much as possible duplicates
> and don't use a `catch-all' clause (using a variable) at the end.
> 5,000 entries is just peanuts.  We've played with tables more than
> 10 times as big without any trouble.
> 

Hello,

Can someone mail a small example program showing how to use a hash
table in SWI Prolog? From the manual, you use hash_term(Term,Key)
to attribute keys to entries; but I do not understand whether you
have to do something special to retrieve them afterwards.

Many thanks,

Pascal Vaillant
Humboldt-Universität Berlin