Leopold Toetsch wrote:
> Please compare to intlist.

  new P0, .<type>
  set I0, 1
  set I1, 0
loop:
  set P0, I0
  set P0[I1], I0
  inc I0
  inc I1
  lt I0, 100000, loop
  set I2, 0
loop_sc:
  set I3, P0[I2]
  inc I2
  lt I2, I1, loop_sc
  end

<type>      Time
Array       13 minutes 18 seconds
PerlArray   13 minutes 16 seconds
ChunkArray  1.45 seconds
IntList     0.58 seconds

Obviously IntList will always be faster, because it does
not use PMCs for the array elements, as well as having
direct random access via the index array.
Since ChunkArray uses sized buffer headers, it does not
work very well with the current CVS DOD code; the above
tests were done with appropriate fixes.
-- 
Peter Gibbs
EmKel Systems


Reply via email to