Robin Davies <rerdavies@msn.com> wrote:
>Floor is a very expensive operation on intel processors as it requires
>reloading of the Floating Point Status word, which, among other things
>creates horrendous stalls, and incurs a very heavy execution penalty.
This is not strictly true. Floor (and assigning a float to an int for that
matter) is expensive _in C_ on Intel processors because the C language
specification requires specific rounding behaviour, and the compiler cannot
guarantee this without explicitly setting/resetting the fpu status word in
such situations, which as you say _is_ very expensive.
If your SAOL compiler has full control over the fpu (such as sarun which
will compile directly to machine code on the fly) then I don't think it's
any more of a problem than any of the other rounding operators.
That said, I have no objection to using rounding instead of Floor as long as
the behaviour of normative opcodes is, well, normative :-)
Best wishes,
Ross.
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:58 EST