Re: [hatari-devel] New option --disable-video and --benchmark

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


Le 24/02/2017 à 19:50, Eero Tamminen a écrit :
Hi,

On 02/24/2017 08:02 PM, Thomas Huth wrote:
On 23.02.2017 23:03, Nicolas Pomarède wrote:
I thought about running Hatari without any window at all, but then more
code would be needed as it's SDL that handles keyboard shortcut (for
example handle ctrl+c to exit Hatari).

FYI, you can also run Hatari without window by setting the
SDL_VIDEODRIVER variable to "dummy".

Sounds good, one-liner implementation for the --benchmark option:
    setenv("SDL_VIDEODRIVER", "dummy", 1);
:-)

I made some tests, it seems the dummy value doesn't disable SDL calls that much : you don't get the video on screen, but you don't get that much speed up.

example :

default behaviour :
hatari --memstate a1.sav --benchmark --disable-video 0 --run-vbls 2000
SPEED: 200.6 VBL/s (2000/10.0s)

disable SDL calls (mainly SDL_Copy / SDL_Render) :
hatari --memstate a1.sav --benchmark --disable-video 1 --run-vbls 2000
SPEED: 270 to 279.7 VBL/s (2000/7.2s)

use dummy driver :
SDL_VIDEODRIVER=dummy hatari --memstate a1.sav --benchmark --disable-video 0 --run-vbls 2000
SPEED: 210.5 to 219.5 VBL/s

use dummy driver + disable SDL calls :
SDL_VIDEODRIVER=dummy hatari --memstate a1.sav --benchmark --disable-video 1 --run-vbls 2000
SPEED: 272.5 to 285 VBL/s


So, dummy driver might be good if you want to run an SDL program on a system without windows capabilities, but for benchmarking it doesn't disable the cost of SDL calls like Copy and Render, the gain is really low (5-10% or less) compared to 35-40% by really disabling SDL calls.

Nicolas




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