[fpc-pascal] Happy tickets benchmark
wkitty42 at windstream.net
wkitty42 at windstream.net
Sun Feb 14 00:36:46 CET 2016
On 02/13/2016 04:21 PM, Vojtěch Čihák wrote:
> I can confirm, Inc(); is slower. Change decreased time from 440 to 390 ms.
my 10 run averages seems to all be right in the same neighborhood... maybe my
machine has a lot more going on in the background which is affecting my
simplistic testing?
AMD Vishera Black FX 8350 8-core 4Ghz 16.0MB cache
Kubuntu 14.04 - 16GB RAM - there are at least 8 VMs running at all times plus
several servers and numerous user apps...
FWIW: these are the results of my tests...
===== inc(TicketsCount) =====
~/development/projects/misc$ for foo in 0 1 2 3 4 5 6 7 8 9; do time
./happytickets; done;
Found 4816030 tickets. Elapsed time, msec: 331
real 0m0.333s
user 0m0.316s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 341
real 0m0.344s
user 0m0.326s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 315
real 0m0.317s
user 0m0.303s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 323
real 0m0.325s
user 0m0.325s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 336
real 0m0.340s
user 0m0.315s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 320
real 0m0.321s
user 0m0.320s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 318
real 0m0.319s
user 0m0.315s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 388
real 0m0.390s
user 0m0.309s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 278
real 0m0.281s
user 0m0.265s
sys 0m0.004s
Found 4816030 tickets. Elapsed time, msec: 297
real 0m0.298s
user 0m0.298s
sys 0m0.000s
===== end =====
===== TicketsCount += 1 =====
~/development/projects/misc$ for foo in 0 1 2 3 4 5 6 7 8 9; do time
./happytickets; done;
Found 4816030 tickets. Elapsed time, msec: 319
real 0m0.321s
user 0m0.311s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 301
real 0m0.302s
user 0m0.302s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 297
real 0m0.299s
user 0m0.277s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 309
real 0m0.310s
user 0m0.310s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 274
real 0m0.275s
user 0m0.274s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 348
real 0m0.356s
user 0m0.325s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 333
real 0m0.334s
user 0m0.319s
sys 0m0.004s
Found 4816030 tickets. Elapsed time, msec: 256
real 0m0.257s
user 0m0.257s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 288
real 0m0.289s
user 0m0.289s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 249
real 0m0.251s
user 0m0.251s
sys 0m0.000s
===== end =====
===== TicketsCount := TicketsCount + 1 =====
~/development/projects/misc$ for foo in 0 1 2 3 4 5 6 7 8 9; do time
./happytickets; done;
Found 4816030 tickets. Elapsed time, msec: 381
real 0m0.383s
user 0m0.328s
sys 0m0.004s
Found 4816030 tickets. Elapsed time, msec: 301
real 0m0.302s
user 0m0.298s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 308
real 0m0.310s
user 0m0.310s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 322
real 0m0.375s
user 0m0.318s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 308
real 0m0.314s
user 0m0.309s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 325
real 0m0.327s
user 0m0.327s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 318
real 0m0.319s
user 0m0.319s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 286
real 0m0.290s
user 0m0.286s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 247
real 0m0.248s
user 0m0.248s
sys 0m0.000s
Found 4816030 tickets. Elapsed time, msec: 290
real 0m0.292s
user 0m0.290s
sys 0m0.000s
===== end =====
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list* unless
private contact is specifically requested and granted.
More information about the fpc-pascal
mailing list