Dynamic arrays in D 1.0

boyd gaboonviper at gmx.net
Mon May 12 10:35:18 PDT 2008


I'm not saying either way is more efficient. I'm saying that slicing and  
concatenation are lower level functionality than insert and delete. So  
most optimizations when using slicing and concatenation will be done by  
the programmer, rather than the compiler or library.

In the end any delete or insert function implementation will have to use  
lower level functionality like concatenating, slicing, memory movement or  
something like that, whereas concatenation and slicing are about as low as  
you can get.

Cheers,
Boyd

----------
On Mon, 12 May 2008 18:36:59 +0200, Me Here <p9e883002 at sneakemail.com>  
wrote:

> boyd wrote:
>
>> Delete and Insert on the other hand are higher level and generally more
>> intuitive. They leave optimization to the compiler/library. And I think
>> most D-users like more control of optimizations than users of more high
>> level languages.
>
> You really think that slice and join will be more efficient, or afford  
> greater
> opportunities for optimisation than insert & delete?
>
> Can I suggest that you produce a simple (or complex) benchmark to  
> demonstrate
> that?
>
> b.



More information about the Digitalmars-d mailing list