[fpc-pascal] Happy tickets benchmark
Giuliano Colla
giuliano.colla at fastwebnet.it
Sun Feb 14 13:32:46 CET 2016
Il 14/02/2016 10:51, Adrian Veith ha scritto:
> When I change the programm to run inside a procedure (because this would
> be the more realistic scenario) the performance decreases about 15% -
> 160ms in global vs 185ms inside procedure.
Using Florian's suggestion, performance outside and inside a procedure
doesn't change that much:
Main program:
> [colla at probookcolla SandBox]$ for foo in 0 1 2 3 4 5 6 7 8 9; do
> ./HappyTickets_florian; done;
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 19
> Found 4816030 tickets. Elapsed time, msec: 23
> Found 4816030 tickets. Elapsed time, msec: 17
> Found 4816030 tickets. Elapsed time, msec: 18
> Found 4816030 tickets. Elapsed time, msec: 17
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 16
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 20
range = 16-23 - average= 19.0 ms
Inside a procedure:
> [colla at probookcolla SandBox]$ for foo in 0 1 2 3 4 5 6 7 8 9; do
> ./HappyTickets_florian; done;
> Found 4816030 tickets. Elapsed time, msec: 24
> Found 4816030 tickets. Elapsed time, msec: 21
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 19
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 18
> Found 4816030 tickets. Elapsed time, msec: 17
> Found 4816030 tickets. Elapsed time, msec: 19
> Found 4816030 tickets. Elapsed time, msec: 20
> Found 4816030 tickets. Elapsed time, msec: 19
range = 17-24 - average = 19.7ms - diff. = +3.68%
Giuliano
More information about the fpc-pascal
mailing list