On 18/02/2016 12:00, fpc-pascal-requ...@lists.freepascal.org wrote:
Date: Wed, 17 Feb 2016 18:55:29 +0100
From: Adrian Veith<adr...@veith-system.de>
To: FPC-Pascal users discussions<fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Happy tickets benchmark
I don't want to insist on this, but: if you measure the runtime of your
program you result = runtime + error. If you measure a series against
MIN you measure MIN(result) = runtime + MIN(error) which delivers the
best value for runtime.
Not at all, any series against MIN delivers the best value for
MIN(result) not for runtime!
Ex.
Prog 1
Run 1: 130 = 100 + 30
Run 2: 160 = 100 + 60
Run 3: 170 = 100 + 70
Min = 130, Avg = 153
Prog 2
Run 1: 120 = 110 + 10
Run 2: 150 = 110 + 40
Run 3: 200 = 110 + 90
Min = 120, Avg = 157
MIN shows that Prog 2 is faster that is wrong.
AVG shows that Prog 1 is faster.
Regards,
Serguei
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal