Re: [hatari-devel] Execution speed

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi Miguel,

On 8.1.2023 18.09, Eero Tamminen wrote:
On 8.1.2023 15.07, Miguel Saro wrote:
my topic today is execution speed. I optimized my latest program and did some testing. The tests are made without validating the exact cycle, with 24-bit addressing and with etos512. Before optimization, the result was obtained in 35 seconds on the Mega Ste emulation at 16 MHz and after optimization in 28 seconds (-20% not bad!).
Results
STE            68000    8 MHz:  56 s
Mega STE    68000  16 MHZ:  28 s
Mega STE    68000  32 MHZ:  14-15 s
TT            68020   32 MHz:  19 s
Falcon        68030   32 MHz:   31 s
I don't understand why Falcon at 32 MHz is slower than the Mega STE at 16 or 32 MHz. Does anyone have an explanation to this ? App is below.

What Hatari settings you are using?

Have you e.g. enabled cycle-exact mode which is a requirement for any kind of measurements?

Are you using the same display mode, e.g. ST-high, for all the machines, so that they are comparable?


I did not see your program providing timing info so are you doing it manually e.g. with stopwatch?

(Wall-time measurements are affected also by things like emulation speed, e.g. your CPU being too slow emulate given setup at full speed, use of fast-forward etc. I.e. the may give pretty wrong results.)

One easy method for exact measurements (after emulation settings are OK), is enabling profiling and setting breakpoints on test start & end. Profile will then tell how long it took.

If our program includes symbols, profile also tells where the time went. Here's info on where it goes under ST emulation:
---------------------------------------
Used cycles:
  12.61%  13.35%  13.35%    60267624  63795188  63795188   CAL4
  10.92%                    52205684                       ROM_TOS
   9.63%                    46038972                       su4
   8.02%  15.75%  15.75%    38310236  75283024  75283024   TRSCx1
   6.99%                    33404872                       voisin
   6.36%                    30384142                       lne3
   5.92%                    28299068                       su3
   5.63%  21.64%  21.64%    26916600 103410608 103410608   CALC4
   5.46%                    26101852                       jaqar
   4.02%   6.87%   6.87%    19236752  32812924  32812924   TRSCex
---------------------------------------

Attached is callgraph of same.

Note that I did not use breakpoints, so above 1 min profile includes showing of the results at the end, and couple of seconds of idling in the UI.

11% of that minute going to ROM TOS sounds still something you might want to look into.


To try, unZIP then clic "search" without changing anything.


	- Eero

Attachment: profile.png
Description: PNG image



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/