Re: New proposal for math.e

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie Ryan wrote:
> Matt:
> 
> The document talks about using hardware .
> 
> 
>  Performance Note:
>  -----------------
>         Calculations using variables declared as integer will usually be
>         somewhat faster than calculations involving variables declared as
>         atom.
>         If your machine has floating-point hardware, Euphoria will use it to
>         manipulate atoms that aren't representable as integers. If your
>         machine
>         doesn't have floating-point hardware, Euphoria will call software
>         floating-point arithmetic routines contained in ex.exe (or in
>         Windows).
>         You can force ex.exe to bypass any floating-point hardware, by setting
>         an environment variable:
> 
>             SET NO87=1
> 
>         The slower software routines will be used, but this could be of some
>         advantage if you are worried about the floating-point bug in some
>         early
>         Pentium chips.
> 
> But I dont see any where in the source checks for it or indicates
> 
> that fp hardware is being used by default.
> 
> 
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

I think that it's in the makefile. Let me check...

Hmm. in the file makefile.wat, /fp5 /fpi87 are added to the compiler flags.
These specify to use processor floating point instructions inline in the object
code and optimizes for Pentium and above.

I'm not sure if recently built versions even use software FP emulation anymore
--

Oh, I found it, in the translator docs:
http://www.rapideuphoria.com/e2c.htm
"To make a DOS program, compiled by WATCOM, that uses fast hardware
floating-point instructions, add -fastfp to the command line. e.g.

      ec -wat -fastfp crunch.ex
 

By default, Euphoria for DOS calls routines to test if hardware floating-point
instructions are available. If they are not, then slower software emulation code
is used. When -fastfp is specified, the compiled code will assume the existence
of hardware floating-point. This can cause floating-point intensive programs to
run about twice as fast, but they will fail to run at all on old 486's and 386's
that are lacking hardware floating-point support. With -fastfp, emake.bat chooses
faster WATCOM C compiler options, and emake.bat must also link in ecfastfp.lib
instead of ec.lib.

On all other platforms, Euphoria uses fast hardware floating-point instructions,
and the operating system handles the case where hardware f.p. is missing."

Hope that helps.

--
"Any programming problem can be solved by adding a level of indirection."
--anonymous
"Any performance problem can be solved by removing a level of indirection."
--M. Haertel
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu