[Shootout-list] Re: sumcol - when the correct answer is wrong
:-)
Brent Fulgham
bfulg@pacbell.net
Thu, 23 Sep 2004 23:37:58 -0700
On 2004-09-21 21:18:31 -0700 Brandon J. Van Every
<vanevery@indiegamedesign.com> wrote:
> Brent Fulgham wrote:
>>
>> I disagree. I don't think it is reasonable behavior
>> to allow integer overlow, unless the developer
>> explicitely codes to allow this behavior. Silently
>> handling a catastrophic condition like this is why
>> cancer patients receive overdoses of radiation,
>> satellites crash into planets, and corporate loan
>> balances turn into "credit" values.
>
> This is a silly argument. There's no a priori reason to assume that
> overflow is catastrophic. You've just cherry picked some specific
> problems where it is. It's not catastrophic to clamp a MPEG codec or
> a
> 3D pipeline, usually. It's often adviseable to do so for performance
> reasons.
Fine. But this test is to sum a column of numbers and provide the
result.
An overflow by definition produces an incorrect output.
> A comparison sheet might be useful, i.e. limits, overflow behavior,
> etc.
> But also kinda boring to come up with. I think "the job" of the
> Shootout is to benchmark performance. Just find a reasonable least
> common denominator standard for the benchmark, i.e. what must be
> fulfilled.
To take a quote drastically out of context, the job of the shootout is
to
show "that there are more things in heaven and earth, Horatio,
than exist in your philosphy". Or rather, more than what can be found
by reading MSDN Magazine or the trade rags. You don't have to be C
to have good performance. In many cases, you can eat your cake and
still have it by using strongly typed languages, or by using dynamic
languages
with strong Kung Fu in their compilers, or by using highly concurrent
languages
to produce fault-tolerant, scalable systems.
I don't pick favorites. I like them all!
-Brent