Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-02

Re: Happy tickets benchmark

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Serguei TARASSOV
Show quoted text 9 lines
Date: Wed, 17 Feb 2016 18:55:29 +0100 From: Adrian Veith To: FPC-Pascal users discussions 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

Reply by email

Adrian Veith
to Serguei TARASSOV

I mark this OT because, this group is surly not interested in this and I am not going to answer on this anymore. We have a saying in Germany: "Wer misst, misst Mist".

cheers, Adrian.

Serguei TARASSOV wrote 35 lines
On 18/02/2016 12:00, wrote: > Date: Wed, 17 Feb 2016 18:55:29 +0100 > From: Adrian Veith > To: FPC-Pascal users discussions > 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 - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Lukasz Sokol
to Serguei TARASSOV: Not at all, any series against MIN delivers the best value for MIN(result) not for…
Serguei TARASSOV wrote 12 lines
On 18/02/2016 12:00, wrote: > Date: Wed, 17 Feb 2016 18:55:29 +0100 > From: Adrian Veith > To: FPC-Pascal users discussions > 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!

Std deviation also matters:

Show quoted text 8 lines
Ex. Prog 1 Run 1: 130 = 100 + 30 Run 2: 160 = 100 + 60 Run 3: 170 = 100 + 70 Min = 130, Avg = 153

std dev = 17

Show quoted text 5 lines
Prog 2 Run 1: 120 = 110 + 10 Run 2: 150 = 110 + 40 Run 3: 200 = 110 + 90 Min = 120, Avg = 157

std dev = 33

MIN shows that Prog 2 is faster that is wrong. AVG shows that Prog 1 is faster.

Std dev shows that runs of Prog2 have more error
so its measurements can't be trusted /more/ than Prog1.

The sample also is too small for meaningful statistics ;)

Regards, Serguei

-L.

Reply by email