News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_ronaldo

SDCC optimization options: experimental analysis

Started by ronaldo, 14:04, 08 June 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronaldo

Starting with the game Platform Climber, which we published some days ago, I have conducted some experiments to determine the best SDCC compilation modifiers to use. The idea is to get the fastest binary possible, even if it takes 2 hours compiling, as this process is done only once at the end.

I have also taken some time to test the performance of the game, which uses from 25,000 to 45,000 CPU cycles per frame. This is less than 66560 available cycles per frame, which implies that the game goes at 50 FPS, except when scroll happens. On scroll frames, 71,000 to 90,000 cycles are used, which consumes 2 screen frames. As scroll happens once in every 18 frames (aprox), the game runs at ~47FPS.

Here you are all the results : DSKs used, screen data outputs and the Openoffice sheet.
You can have a look at this results summary PDF.
And you also can check the source coude used to measure times (game function).

I expect to release an article soon explaining the whole process in detail. Meanwhile, the generic recomendation is to use these modifiers for optimized compilation (CPCtelera example):
make Z80CCFLAGS="--max-allocs-per-node 2000000 --opt-code-speed"


ronaldo

#1
Sorry: I mistakenly added spanish version of the image previously  :-[ . Now you have the english version

Powered by SMFPacks Menu Editor Mod