About structs and performant handling

Namespace rswhite4 at googlemail.com
Sat Mar 9 12:54:45 PST 2013


> Benchmarks on dpaste aren't very useful because I think no 
> optimization switches are used, and because the CPU is not 
> under control, so other unknown tasks can steal some of its 
> time.
>
> Bye,
> bearophile

I used optimation switches:
Application arguments:
-O -release -noboundscheck

But you're right, but what should I do?
I could deliver you my results from my pc:
[quote]
Call b0 (B by ref).  Duration: 259 total, 0.129500 average.
Call b1 (B by move). Duration: 804 total, 0.402000 average.
Call b2 (B by make). Duration: 364 total, 0.182000 average.
Call b3 (B by copy). Duration: 943 total, 0.471500 average.
Call b4 (B by manual move). Duration: 1101 total, 0.550500 
average.
Call b5  (A by move). Duration: 17 total, 0.008500 average.
Call b6 (A by copy). Duration: 65 total, 0.032500 average.
Call b7 (A by ref).  Duration: 47 total, 0.023500 average.
Call b8 (A by make). Duration: 54 total, 0.027000 average.
[/quote]
Also compiled with -O -release -noboundscheck on a Intel i5-2500k 
CPU with 3.30 GHz.
But the script is there. So you could test by yourself. :)


More information about the Digitalmars-d mailing list