Hello!

  In the docs of the `declare` word it says:

The optimizer cannot do anything with the below code:
`2 + 10 *`
However, if we declare that the top of the stack is a float, then type checks 
and generic dispatch are eliminated, and the compiler can use unsafe intrinsics:
`{ float } declare 2 + 10 *`

  I wanted to ask: does declaring the types of parameters using the TYPED: word 
have the same effect on the optimizer (with the difference, of course, that it 
actually adds the type tests as necessary) or not? In other words, do these two 
mechanisms play well together? Would it be beneficial or completely superfluous 
to do this:

TYPED: +1 ( a: float -- b: float )
    { float } declare 1 + ;

  PS: I'm asking here, because there still is no x86 variant of the 
libudis86.dll at the Factor FTP, there is only the x64 version.

---=====--- 
 Александр

------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to