Subject: Re: mk.conf and "I387_LIBM"
To: Manuel Bouyer <email@example.com>
From: Steven M. Bellovin <firstname.lastname@example.org>
Date: 10/22/2000 11:53:57
In message <20001022131246.A456@antioche.eu.org>, Manuel Bouyer writes:
>On Sun, Oct 22, 2000 at 04:08:16PM +1100, Chris Baird wrote:
>> While profiling a math-intensive application, I discovered that libm,
>> (as built by a 1.4.2 'make release'), uses software rather than
>> hardware based math functions, at least with sqrt.
>> Digging deeper revealed "i387_LIBM" in mk.conf controls this, and
>> recompiling a FPU-savvy math library made an incredible difference in
>> FP performance. (My satellite predictor program now runs 3 times
>> faster with no differences in output...)
>> Is there any reason the port doesn't use this by default?
>Yes, because we may run on FPU-less hardware.
>> (Particularly with FPUs being IEEE754/854.) At the very least,
>> I387_LIBM should be documented somewhere (aside from the 1.3-1.4
>> Let me know if this should not be pr'd.
>1.5 has a mechanism to choose the rigth library at run-time.
What is the default? Unless something in the single-user boot
facilities (init, sh, and a few utilities like ls, cat, and mv) need
FPU, I suspect that having an FPU should be the default, with the
ability for the administrator to select otherwise at installation time.
Btw, what do you mean by "run-time"? Per command? That strikes me as
unreasonable, since FPUs don't, as a rule, come and go.