users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Hash Table


From: Hector Luis Palacios V.
Subject: RE: Hash Table
Date: Mon, 1 Oct 2001 10:27:19 -0400 (GMT)

Paul, you gave us a solution to that, but what happend
with "assert" and "retract" in compile code?
How about the performance??

A reason to have a hash table may be the specific hash function
that you want to use, by example.
So, I still interested in the question about the table.


On Mon, 1 Oct 2001, Paul Leader wrote:

> I'm intregued as to why you would want a hash table in Prolog.
> ............
> insert(Index, Item) :- assert(hash_item(Index, Object)).
> 
> retrieve(Index, Item) :- hash_item(Index, Object).
> ................
> 
> Hope this helps.  Indexing, like difference lists is a trick that can really
> improve the preformance of a Prolog program and is worth using.
> 
> The best thing to do is try it out and time it to see if the speed
> difference is worth the work.
> 
> Paul Leader
> 


Hector Palacios




reply via email to

[Prev in Thread] Current Thread [Next in Thread]