[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Data types (was: Re: Access the neighbors of an element)
From: |
Paul Kienzle |
Subject: |
Re: Data types (was: Re: Access the neighbors of an element) |
Date: |
Sat, 12 Feb 2005 15:38:28 -0500 |
Some more details:
On MIPS it is faster to convert to double and perform the multiplication
than to convert to a wider integer and do it.
On X86 the gains from using integer operations are much bigger than for
MIPS or PPC.
Even bigger gains for X86 32-bit architectures and LONGLONG double
multiplication are possible by casting the address of the value as
a pointer to two long integers:
# elif defined(LONGLONG)
#if defined(LITTLEENDIAN_32)
unsigned long *px = &x, *py = &y;
if ( (px[1] && (py[1] || px[1]*y > LO)) || (py[1] && (py[1]*x > LO)) )
#else
if ((x > LO && (y > LO || (x>>HALF)*y > LO)) || (y>LO && (y>>HALF)*x
> LO))
#endif
z = MX;
else z = x * y;
- Paul
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Access the neighbors of an element, Joerg Sommer, 2005/02/09
- Re: Access the neighbors of an element, Mike Miller, 2005/02/09
- Re: Access the neighbors of an element, Francesco Potorti`, 2005/02/10
- Message not available
- Re: Access the neighbors of an element, Jörg Sommer, 2005/02/10
- Re: Access the neighbors of an element, Francesco Potorti`, 2005/02/11
- Re: Access the neighbors of an element, Joerg Sommer, 2005/02/11
- Re: Access the neighbors of an element, John W. Eaton, 2005/02/11
- Data types (was: Re: Access the neighbors of an element), Joerg Sommer, 2005/02/12
- Data types (was: Re: Access the neighbors of an element), John W. Eaton, 2005/02/12
- Re: Data types (was: Re: Access the neighbors of an element), Paul Kienzle, 2005/02/12
- Re: Data types (was: Re: Access the neighbors of an element),
Paul Kienzle <=
- Re: Access the neighbors of an element, Joerg Sommer, 2005/02/12