symbol managment in Caml

From: Stephan Houben (stephan@pcrm.win.tue.nl)
Date: Fri Feb 25 2000 - 13:16:22 MET

  • Next message: Juergen Pfitzenmaier: "Re: Portability of applications written in OCAML: C stuff"

    Hello list,

    I am writing an interpreter for a simple language in O'Caml.
    The interpreter often needs to search a hash table with a string
    as key. A common optimization for this is to use pointer identity
    instead of string equality, and "intern" every string before using
    it as a key to the hash table.

    Unfortunately, I don't see how to do this with the current O'Caml
    libs. You can do identity checks with ==, but there seems no way
    to get a good hash corresponding to ==.

    Has anyone already written some code for this task?

    Thanks in advance,

    Stephan



    This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:22:05 MET