Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Hashtbl and destructive operations on keys
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Thomas Fischbacher <Thomas.Fischbacher@P...>
Subject: [Caml-list] Hashtbl and destructive operations on keys

Dear ocaml hackers,

I read the documentation in such a way that I must not assume that after
doing a Hashtbl.replace hash key new_val, I can destructively modify key
with impunity. (I do cons a new key at every Hashtbl.add.)

On the other hand (I have not looked into the sources), I am quite 
confident that the system _could_ give me the guarantee that 
nothing evil happens if I do so, and especially for the application I am 
presently working on, this would induce a noticeable performance gain,
due to reduced consing. (And performance is important here!)

So, could I please get this officially sanctioned? :-)


-- 
regards,               tf@cip.physik.uni-muenchen.de              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners