T`hank you. My guess was not based on timing but on the idea of a constant versus computed function. And yes, the timing will vary on any multitasking OS depending on load. I was just getting a crude timing.

Donna
[EMAIL PROTECTED]



On 5-Jul-06, at 8:26 PM, R&S HUI wrote:

1p1 calls no functions so there is nothing to memoize.
o.y is not a good candidate for memoization as the
time and space for a look-up have to compete against
a straightforward multiplication.

Anyway it is not prudent to draw conclusions from
timing a single execution of a trivial expression.

   1e5 (6!:2) '1p1'
4.54336e_6
   1e5 (6!:2) 'o.1'
1.59828e_6



----- Original Message -----
From: dly <[EMAIL PROTECTED]>
Date: Wednesday, July 5, 2006 12:06 pm
Subject: Re: [Jgeneral] J as a functional programming language

YANQ

In J, is 1p1 currently memoized?  What about o.1?

  6!:2 '1p1'
0.000195007
   6!:2 'o.1'
6.10352e_5

I guess not in the later case.


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

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

Reply via email to