From: Brian H. <bh...@sp...> - 2004-04-09 20:45:31
|
On Fri, 9 Apr 2004, Nicolas Cannasse wrote: A couple of questions: > external unsafe_char_of_int : int -> char = "%identity" Is this really any faster than using the pervasives char_of_int? > let inv_chars = > let a = Array.make 256 (-1) in > for i = 0 to 63 do > Array.unsafe_set a (int_of_char (Array.unsafe_get chars i)) i; Likewise- especially since this code will be executed only once (on module load), is unsafe_set worthwhile to call? > let c = int_of_char (String.unsafe_get s i) in Ditto & etc. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian |