performance of structs vs classes

Christian Köstlin christian.koestlin at gmail.com
Mon Sep 26 13:49:11 PDT 2011


On 09/26/2011 10:30 PM, Steven Schveighoffer wrote:
> On Mon, 26 Sep 2011 15:58:48 -0400, bearophile
> <bearophileHUGS at lycos.com> wrote:
>
>> Christian K.:
>>
>>> i totally misused the stopwatch api.
>>
>> I have misused it the same way, the first time. If other people will
>> find the same problem then it means its API has problems.
>
> Have you ever used a real stopwatch? It works the same way :) Start/stop
> does not reset the time to 0, it just adds more time to the total. Reset
> clears to 0.
>
> I think probably the documentation needs to be better. The example also
> suggests start resets the stopwatch.
>
> -Steve
you are totally right ... it is the same as a real stopwatch ... so 
there should be no problem (i also used it correctly in another 
benchmark, but it was quite late and ...)

thanks

christian




More information about the Digitalmars-d-learn mailing list