Re: [hatari-devel] Execution speed

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


Hi,

I don't think measuring 030 "emulation speed" without enabling CPU cache emulation is worth much.

As there's clear performance difference between TT and Falcon, although in both cases you're running 020/030 at 32Mhz, I think main problem in manual timing is that your host CPU is not fast enough for emulation.

(Using profiler for timings would not have problem with that as it counts time using emulated CPU cycle counter.)

As your test program is using neither sound nor DSP, disable both with "--dsp none" and "--sound off".


	- Eero

On 14.1.2023 21.16, Miguel Saro wrote:
I wasn't looking for the execution time on real machines, but rather to find an insight into the performance of the simulations. I know, emulating the TT or the Falcon is more complex than emulating the STE or Mega STE.
Miguel

Le 14 janv. 2023 à 18:47, Eero Tamminen <oak@xxxxxxxxxxxxxx> a écrit :

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?
	Emulator  with  etos512kfr   4Mo
		STE   8MHz    Mega Ste 16,32 MHz  TT 32 MHz  Falcon 32 MHz

Have you e.g. enabled cycle-exact mode which is a requirement for any kind of measurements?
	Oh no, see first sentences.

Are you using the same display mode, e.g. ST-high, for all the machines, so that they are comparable?
	Exactly same display mode. VDI  800 x600  4 colors.

I did not see your program providing timing info so are you doing it manually e.g. with stopwatch?
	Manually with the clock in seconds. By doing 5 the test.  Error: approximately 1 second

(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<profile.png>

M et Y Saro
Méaudre:  04 76 94 79 32
Seyssinet: 04 76 21 61 02
// locations. vercors. free. fr
// cocoa. pod. free. fr





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