[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: benchmarks - sort
From: |
Schloegl Alois |
Subject: |
Re: benchmarks - sort |
Date: |
Tue, 6 Jan 2004 20:38:00 +0100 |
User-agent: |
Internet Messaging Program (IMP) 4.0-cvs |
Zitat von "John W. Eaton" <address@hidden>:
> On 6-Jan-2004, Schloegl Alois <address@hidden> wrote:
>
> | One reason, for the bad performance of the sort algorithm might be the
> exception
> | handling of NaNs. See also
> | http://www.octave.org/octave-lists/archive/bug-octave.2001/msg00047.html
> |
> | Sorting on the binary level might be helpful, because the bit patterns of
> the
> | IEEE754 numbers provide the correct sorting order. This is
> | -inf < -1 < 0 < 1 < inf < NaN
>
> Can you explain precisely what you mean by sorting on the binary
> level?
>
> jwe
>
Instead of floating point comparison, one could use integer comparision.
Because the exponent is in the Most Significant Bytes, a comparison based
This would require casting floating point numbers into integers (signed long
long should do), and casting does not take any effort in C.
Alois
- benchmarks, Paul Kienzle, 2004/01/05
- Re: benchmarks, David Bateman, 2004/01/06
- Re: benchmarks - sort, Schloegl Alois, 2004/01/06
- benchmarks, John W. Eaton, 2004/01/06
- packages (was: benchmarks), John W. Eaton, 2004/01/06
- randn benchmarks, David Bateman, 2004/01/22