My judgment is that the special cases described for in the msg for which faster computations exist, do not occur sufficiently often to warrant the special code which would slow down the general cases. I am also skeptical that zero detection in */ would save "an immense amount of time", or that in practice */y would be performed on a lengthy y .
----- Original Message ----- From: Richard Donovan <[EMAIL PROTECTED]> Date: Sunday, November 25, 2007 4:59 Subject: [Jgeneral] Request for change To: General forum <[email protected]> > > It would save me a lot of time if */ y > (product) could be made to return zero result as > soon as it encounters a 0 in y . > > y=.0,1e7#7 > > ts > '*/y' NB. nearly six seconds to calc on a mid-range pentium > 5.85124 1088 > > could in fact return zero "instantaneously". Oviously this is > the "best/worst case scenario" to make > my point but it seems that */ continues the > multiplication even after it "knows" that the result > will be zero. I have records containing many thousands of > fields, any of which could be zero, and > it would save an immense amount of time if */ could > be amended. > > This seems like it may be an easy and worthwhile change. > > Similarly... > > x=.0 > > ts 'y- > x' NB. Lots of time and space to do nothing! > 0.149041 6.71095e7 > > ts 'y+x' > 0.157018 6.71095e7 > > ts 'y' > 1.00571e_5 384 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
