>>>>> "Dan" == Dan Bron <[EMAIL PROTECTED]> writes:

Dan> Further, ignoring the semantics of m&v , there is an issue of
Dan> performance.  The expression u^:vector can be optimized by
Dan> applying u a maximum of >./vector times.  If ^: can only see a
Dan> scalar at a time, no such optimization is possible.

I hadn't realized that such an optimization was allowed (because of
possible side-effects of v). I see that this is done already:

   a=:0
   v=:3 : 0
a=:a+1
y*2
)
   (v^:1 2 3 1 2 3) 1
2 4 8 2 4 8
   a
3

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to