> Is Skip Cave saying that the closed form solution is inferior?
> Bo
>

No. What I am saying is:

The brute force solution is the fastest by several orders of magnitude,
but uses lots of space:

   ts '((0 3+*&5)^:(i.5000))1 0x'
0.0714665 2.59842e7

The closed form solution is slow AND uses lots of space:

   ts '(,.3*4%~1-~])5^(i.5000x)'
7.70079 4.99247e7

The looping solution is slow, but not as slow as the closed form. However
it uses many orders of magnitude less space.

   ts 'acx 5000'
2.51865 107264

So if your criteria is time and space usage, then the closed form is the
worst of the lot. There may be other criteria that would result in a
different conclusion. As I have mentioned before, processing time and space
is still much less costly than human programming time, so the large
differences in time and space usage are still miniscule when compared with
the time it took to develop these verbs.

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

Reply via email to