drastic slowdown for copies

Momo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 29 06:55:22 PDT 2015


Perhaps you can give me another detailed answer.
I get a slowdown for all parts (ref, copy and move) if I use 
uninitialized floats. I got these results from the following code:

by ref:  2369
by copy: 2335
by move: 2341

Code:

struct vec2f {
     float x;
     float y;
}

But if I assign 0 to them I got these results:

by ref:  49
by copy: 22
by move: 25

Why?


More information about the Digitalmars-d-learn mailing list