[mercury-users] Mercury library for large data set

Ian MacLarty maclarty at csse.unimelb.edu.au
Thu Mar 3 09:37:27 AEDT 2011


On Thu, Mar 3, 2011 at 8:58 AM, Jeff Thompson <jeff at thefirst.org> wrote:

> I have a Prolog program that uses assert to copy many records to a
> predicate for querying, such as
> customer(ID, CustomerName).
> (A key is created for fast lookup.)  Once the data is loaded, it is not
> modified.  Only declarative queries are made.
>
> What is the recommended Mercury library for storing a table like this with
> keyed lookup, with an emphasis on handling tens of thousands of rows and
> efficient lookup (but not a need to modify efficiently)?
>
>
Have a look at the map module.  This is wrapper around tree234.  You could
also try rbtree or version_hashtable.  If your keys are integers you might
also want to look at version_array.

Ian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20110303/6a436d3a/attachment.html>


More information about the users mailing list