Change representation of dynamic arrays?

Daniel Keep daniel.keep.lists at gmail.com
Fri Oct 19 20:11:44 PDT 2007



Walter Bright wrote:
> [stuff]

I'm hesitant to break something like this which is basically invisible
to the end user.  Then again, a 70% speed increase is not something to
turn one's nose up at!  And, as you said, you D 2.0 was forked so that
changes like this could be made.

You say you've measured the performance of loops using this, but what
about slicing code?  I know that I use a lot of [lower..$-something]
style code; how much slower does this become?  Once I'm not so busy, I
might try to work out the proportion of foreach to $ slicing in my code. :P

But, if the gains are there, and there's nothing critical that it breaks
that you haven't thought of, I can't see any reason not to do it.

	-- Daniel

P.S. I assume that array.ptr = array.start, and we'll have access to
array.end, yes?



More information about the Digitalmars-d mailing list