Array append performance
Walter Bright
newshound1 at digitalmars.com
Thu Aug 28 01:06:11 PDT 2008
Lionello Lunesu wrote:
> The problem is that the timing for the small arrays cannot be trusted as
> there's more overhead than actual code being tested. I've changed your
> code by doing each test 100_000_000/i times. I've also added 'cpuid' for
> synchronization, as Don suggested:
I suspect that copying the same data over and over again is not
representative of actual usage, and so is not giving useful results.
I also do not understand the usage of cpuid here. I've used rdtsc for
years for profiling purposes, and it has given me results that match the
clock-on-the-wall results.
More information about the Digitalmars-d
mailing list