Erich,

I timed three methods of filling a block with successive integers from `
1 to 1000. The times are for 1000 iterations. It would seem that head
recursion is rather slow.

Jerry,

>> time-block/reps [a: array 0  for i 1 1000 1 [insert tail a i]] 1000
0:00:11
>> time-block/reps [a: array 0  for i 1000 1 -1 [insert a i]] 1000
0:00:31
>> time-block/reps [a: array 1000  for i 1 1000 1 [poke a i i]] 1000
0:00:09
>> a
== [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 4...
>>

Reply via email to