[Issue 2313] Poor array ~= append performance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 27 04:37:54 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2313





------- Comment #6 from lio+bugzilla at lunesu.com  2008-08-27 06:37 -------
I've checked my results, and memcpy still beats []=[] by a landslide. Here are
the results:

Gold (using 'prior knowledge'):
#    (cast(int*)x.ptr)[length] = *cast(int*)argp;
4193ms.

Silver:
#    memcpy(x.ptr + length * sizeelem, argp, sizeelem);
5450ms.

DNF:
#    x.ptr[length * sizeelem .. newsize] = argp[0 .. sizeelem];
10270ms.

I'll attach the .asm files.


-- 



More information about the Digitalmars-d-bugs mailing list