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

Re: New libode version



On 10/09/15 12:25, Leopold Palomo-Avellaneda wrote:
> That bug made a reference about that, in lower hardware (32 bits) ode is too 
> slow.

That's not how it works. On a few less-powerful CPUs (in particular
older generations of 32-bit ARM, or other platforms lacking hardware
floating-point units), float is significantly faster than double. On
mainstream CPUs with a FPU (such as i386), there's little difference.

> That means 
> that with 32 bit platforms, if we use floats (4 bytes = 32 bits), every 
> operation is done with one cpu step (?), but if we uses doubles (8 bytes = 64 
> bits), every operation needs two, so it becomes slooow. 

i386 can do double-precision floating-point operations perfectly well.
The fact that it only has a 32-bit address space is not relevant.

> I think that we can have the same package in debian, but with the platforms 
> with 32 bits using single precision and with 64 double. With this solution I 
> think that all the needs would be covered. It's more simple to maintain and we 
> don't have duplication of packages. 

You could consider using float on armel and maybe mips(el), and double
on everything else... but it's certainly unnecessary to restrict
yourself to single-precision floating point on i386 or armhf, for
instance. Those architectures are 32-bit but are guaranteed[1] to have
hardware floating-point.

    S

[1] For a genuine 386 the 387 FPU was an optional addon, and 486s were
available with (486DX) and without (486SX) a FPU; but modern Debian's
baseline for i386 is actually i586, i.e. Pentium-compatible, which I'm
pretty sure guarantees the presence of a 387-compatible FPU.


Reply to: