Leopold Toetsch wrote:
> Please compare to intlist.
new P0, .
set I0, 1
set I1, 0
loop:
set P0, I0
set P0[I1], I0
inc I0
inc I1
lt I0, 10, loop
set I2, 0
loop_sc:
set I3, P0[I2]
inc I2
lt I2, I1, loop_sc
end
Time
Array 13 minutes 18 seconds
PerlArray 1
Peter Gibbs wrote:
> Simon Cozens wrote:
>>Put another loop in, which sets I1 to every array element in turn,
>>(maybe make this an inner loop which runs each time you extend) and
>>re-benchmark.
> 25000: CVS = 47 seconds, grey = 1 second
Please compare to intlist.
leo
Leopold Toetsch wrote:
> Peter Gibbs wrote:
> Did you look at indexed access, shift, unshift, splice ;-)
I have simply modified classes/array.pmc, which does not yet
implement shift or unshift; grey aims to provide alternative
implementations, rather than add new functionality. However,
since Dan
Simon Cozens wrote:
> That's great, but what impact does it have on access to individual
> elements? If you're not careful, you may find that accessing stuff in
> the array gets quite seriously slower. Linked lists being O(n) access
> and all that...
I certainly hope that access gets slower, othe
Peter Gibbs wrote:
> I have been looking at other areas for improvements.
> Arrays seem to be one such area, ...
Yep
> This is using a singly linked list of variable sized chunks,
> without a separate index array. Each chunk is created
> with a minimum size (4 entries at present), then doubl
At 5:27 PM +0200 10/2/02, Peter Gibbs wrote:
>On my machine, CVS parrot completes the above in
>an elapsed time of 13 minutes; grey takes 14 seconds.
Cool. Since this is a PMC class, I expect, and thus self-contained
(right? :) it ought to be fine to check it in as an alternate array.
If you co
[EMAIL PROTECTED] (Peter Gibbs) writes:
> On my machine, CVS parrot completes the above in
> an elapsed time of 13 minutes; grey takes 14 seconds.
> Changing the iteration count to 25000 takes 1 second
> with grey versus 46 seconds for CVS.
That's great, but what impact does it have on access
Having decided that life.pasm was not going to get much
better (58 seconds for 5000 generations vs 118 for CVS),
I have been looking at other areas for improvements.
Arrays seem to be one such area, as the current CVS code
expands arrays by creating a new one and copying all the
data. I believe L