On a cleaner system I get

   rnk2 5&ts&>'pair2 y';'2&comb3 y';'pair3 y'[y=.5000
1   1.04 1.00     0.737 2.834e8
2   1.11 1.00     0.791 2.833e8
0   1.00 1.00     0.711 2.833e8

rnk2=: 1 7j2 5j2 10j3 8j_3 ": (,.~[: (/:@/:@:({."1) ,. }."1) (%"1 <./)@:(,.~
*/"1))          NB. wrap around!


R.E. Boss


-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Arie Groeneveld
Verzonden: vrijdag 7 november 2008 16:25
Aan: Programming forum
Onderwerp: Re: [Jprogramming] pairs

I executed both lines, having different arguments, several times,
because I didn't get the same result as RE.Boss timings.

   5j2": (%"1<./) 5&(6!:2)&>'pairi ry';'pair2 ry';'2&comb3 ry'[ry=.1000
34.34 1.00 1.04


Devon McCormick schreef:
> This looks like the usual variability of timing few iterations.  If you
try
> this with 100 iterations, i.e.
>
>    5j2": (%"1<./) 100&(6!:2)&>'pair2 ry';'pair3 ry' [ry=.25
>
> your results should be more stable.
>
> On Fri, Nov 7, 2008 at 9:38 AM, Arie Groeneveld <[EMAIL PROTECTED]>
wrote:
>
>   
>> However....
>>
>> Executing the following two lines several times (sometimes I get erratic
>> results):
>>
>>   5j2": (%"1<./) 5&(6!:2)&>'pair2 ry';'pair3 ry' [ry=.25
>>  1.00 1.34
>>
>>   5j2": (%"1<./) 5&(6!:2)&>'pair2 ry';'pair3 ry' [ry=.1000
>>  1.02 1.00
>>
>>
>> Arie Groeneveld schreef:
>>     
>>> Slower , but more concise
>>>
>>> pair3=:[:;<@({.,.}.)[EMAIL PROTECTED]
>>>
>>>
>>> Arie Groeneveld schreef:
>>>
>>>       
>>>> pair2=:([:;],."0 _&.>[:<\.1&+)@i.@<:
>>>>
>>>>    (pair2-:pairi) 100
>>>> 1
>>>>
>>>>
>>>>
>>>>         
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>>
>>>       
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>>     
>
>
>
>   
----------------------------------------------------------------------
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