comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Game Programming / Graphics
Date: Sun, 3 Apr 2005 18:10:12 +0200
Date: 2005-04-03T18:10:05+02:00	[thread overview]
Message-ID: <gx0g124exlgx.1e8okcwv49zwu.dlg@40tude.net> (raw)
In-Reply-To: 1112539926.068726.93830@z14g2000cwz.googlegroups.com

On 3 Apr 2005 07:52:06 -0700, jsnX wrote:

>> Ada's numerics are based on a contract model. Ada's
>> numerics are true types. You can have different numeric
>> types and the compiler will prevent you from mixing them,
>> if you do not define corresponding operations. As
>> types they may have constrained subtypes with range
>> checks enforced. Other differences are that Ada has
>> fixed point binary and decimal numbers additionally to
>> the floating-point ones.
> 
> sounds pretty neat, but is it computationally expensive? if i write
> numeric stuff in Ada (vector operations, special functions, physics
> stuff) will it be in general:
>     a) slower than the same stuff written in good (templated) C++
>     b) faster than the same stuff written in good (templated) C++
>     c) hard to say - sometimes faster, sometimes slower
>     d) hard to say - depends heavily on compiler
>     e) other - please write in

If you are going to use floating-point numbers, then I can't see any reason
why it should be either faster or slower. Most likely all computations will
be made in the machine type that fits at most. Portability is an advantage,
though portable error handling can still be tricky.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2005-04-03 16:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-02 19:54 Game Programming / Graphics jsnX
2005-04-02 22:35 ` Luke A. Guest
2005-04-03 15:01   ` jsnX
2005-04-03 16:51     ` Luke A. Guest
2005-04-03 17:18       ` jsnX
2005-04-03 17:25         ` Leif Roar Moldskred
2005-04-03 18:37     ` beliavsky
2005-04-13 22:15     ` Lionel Draghi
2005-04-26  1:37       ` adaworks
2005-04-26 17:50         ` Dr. Adrian Wrigley
2005-04-03  8:53 ` Dmitry A. Kazakov
2005-04-03 14:52   ` jsnX
2005-04-03 15:51     ` Pascal Obry
2005-04-03 17:23       ` jsnX
2005-04-03 18:19         ` Pascal Obry
2005-04-03 16:10     ` Dmitry A. Kazakov [this message]
2005-04-10 10:05 ` step_y
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox