[Shootout-list] Safety vs. speed

Brian Hurt bhurt@spnz.org
Wed, 22 Sep 2004 14:42:36 -0500 (CDT)


On Tue, 21 Sep 2004, Peter Hinely wrote:

> Hi,
> 
> > Any language with a C FFI is unsafe.
> 
> Have I not been talking about the tests themselves?  It's not whether a
> language is unsafe, it's whethere the benchmark entry in that language
> compiled with whatever flags it was compiled with is unsafe.

So a C test that actually did bounds checking on array access would be 
considered "safe", but an Ocaml program compiled with -unsafe would not?

> That's why I put it in a different paragraph.  I don't get your point. Any
> non-trivial program is going to use integers (and maybe wrongly assume
> that no overflow has occurred).

And in real program, overflows are rarely seen.  You generally run into 
other constraints counting things long before you hit overflow problems.  
I don't recall ever needing to calculate 230! in a real program- if I did, 
I'd probably do it in FP.

-- 
"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