From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 4CDAD7EEAF for ; Fri, 18 Jan 2013 19:27:55 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.52 as permitted sender) identity=mailfrom; client-ip=209.85.214.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f52.google.com) identity=helo; client-ip=209.85.214.52; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0CAGmT+VDRVdY0jWdsb2JhbABEDoVwAbgxCBYOAQEBAQkJCwkSBiOCHgEBBUABGx0BAwwGBQsNLiIBEQEFARwGE4gGAQMPnweMNIJ7hQMKGScNWYd/AQUMkS0DlgyOaBYpg1k/ X-IronPort-AV: E=Sophos;i="4.84,494,1355094000"; d="scan'208";a="190616074" Received: from mail-bk0-f52.google.com ([209.85.214.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Jan 2013 19:27:54 +0100 Received: by mail-bk0-f52.google.com with SMTP id w5so2141162bku.25 for ; Fri, 18 Jan 2013 10:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=GSkxUTwx5xhldEJNMuYHgdEYqIrTOiNLRsJXxALBoRY=; b=r9Wxhh9pw5nQHZXcEDTBzPhjThxR399Y2gyZTHYbW3d7KQyXeWHU7HXa0QKD18uci9 FJyryjZsr0ZAgM1/ARajKLAahMzH+jeEAiXKZTWMRW/s2f/HJL6oQMGOshaaie33awhV DUQwLCifals5UQKLphO2YsZ0MFQIgA9Sg7LbsHRkVoSMPnCQJWZ4IbjFE5ukc1svDPiJ AdoZoulNknYpzIQB4xZy+L/qFNQ7xzvsLVJX0VsvftON3VCim4OpEcjWsVjla82Wpouk 93djgFf1M/hYkeCwwQ0fRltEGyir2vBaIcR+81NjnGXaEZVlNrlwjiJVD7u11Lm+pZ86 UD8A== X-Received: by 10.204.150.137 with SMTP id y9mr2766881bkv.103.1358533674366; Fri, 18 Jan 2013 10:27:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.236.134 with HTTP; Fri, 18 Jan 2013 10:27:14 -0800 (PST) In-Reply-To: <50F98A81.6080902@cs.cornell.edu> References: <50F81A48.4080901@cs.cornell.edu> <50F98A81.6080902@cs.cornell.edu> From: Gabriel Scherer Date: Fri, 18 Jan 2013 19:27:14 +0100 Message-ID: To: Jean-Baptiste Jeannin Cc: Nicholas Lucaroni , Edgar Friendly , "caml-list@inria.fr" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Hash function: complexity and circular structures A blunt point of view: comparing implicitly circular structures is a sure road to hell, and you should use an explicit representation of circularity (eg. with a element that just means "nothing here, you should rewind to the other side") that will not blow up at each occasion it gets -- and is generally much more flexible. On Fri, Jan 18, 2013 at 6:46 PM, Jean-Baptiste Jeannin wrote: > > I would be curious to know if this is by design (it is supposed not to > work), or if it is a problem with the implementation of compare, or of > Hashtbl.find. In particular, if it is by design, why have updated the hash > function to support circular lists? > I am also now stuck on creating an (efficient) hashtable supporting circular > data structures as keys. Any idea on this?