help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integer and floating point types


From: Jaroslav Hajek
Subject: Re: Integer and floating point types
Date: Thu, 21 Jan 2010 21:37:33 +0100

On Thu, Jan 21, 2010 at 5:28 PM, George <address@hidden> wrote:
> On Thu, Jan 21, 2010 at 10:44 AM, Jaroslav Hajek <address@hidden> wrote:
>
>> We might still add integer matrix multiplication, despite the
>> anticipated slowness. Division is out of question for obvious reasons.
>> Do you have a real-life application for integer matrix multiplication?
>
> Can't say that I have... Thanks for the explanation though, it makes
> sense. Also, if I do change my data to reals, how much of a
> performance increase would I get if I used single instead of double
> precision? I know that I can run my own benchmarks, however you might
> have some more general conclusions.

On a typical modern computer computing in single precision will be
0%-100% (i.e. 2x) faster, mainly due to less memory traffic. Also, the
number of SSE registers is doubled when single precision is used,
which may also be important. For other operations, you may see smaller
speed-up, or no speed-up at all.

> Is there a similar reasoning
> behind using double as the default type?
>

I think that's a combination of historical reasons (C language, for
instance), and laziness. With doubles, you need to be much less
careful about numerical robustness.
-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]