From: Brian H. <bh...@sp...> - 2004-04-09 21:50:18
|
On Fri, 9 Apr 2004, Nicolas Cannasse wrote: > > 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? > > %identity means it's removed at compile time, it's just a typed Obj.magic. > on the other side you have : > > let char_of_int n = > if n < 0 || n > 255 then invalid_arg "char_of_int" else > unsafe_char_of_int n I know what %identity is. I was wondering if it really was faster. Doesn't Ocamlopt have deadcode removal? If we have one issue we constantly butt heads over, it's optimization. -- "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 |