here are my "benchmarks" using the latest compiler, giving strange results!
My midiplayer has a counter, which is incremented, when a delay between 2 midi-events (defined in the midi-file) could not be met by the player, because the system (Zeddy-player, USB stick holding the midi-file, RS232 uart used to send the midi-data) is too slow to be back from its work to fulfill the given delay to the next midi event.
My first player version was compiled using the old Z88DK version dated December 2015. Playing my test song, I got a value of 825 delay violations (goal is 0).
After that I optimized the code for speed (using also your hints) and used the latest compiler using the compiler options:
zcc +zx81 -startup=2 -m -O2 --opt-code-speed=all -create-app -Cz--disable-autorun -vn -o MidiPlay.bin MidiPlayer.c
Running my testsong I got the value of 800 delay violations (good progress
But when I compiled that opimized program again, using the old compiler version and run my testsong again, I got a better result: 785 delay violations!
It seems, that the old compiler version creates faster code than the new version ...
Then I compiled an old project, where the size of the program is critical. I compiled with that options:
zcc +zx81 -startup=2 -O3 -zorg=11192 -vn -DDRIVER=8192 -o ufm-11192.bin ufm-driver.c
which gave a file size of 5475 bytes (too big!), using the latest compiler.
When I used again the old compiler version, I got a file size of 5095 bytes (is OK, limit is 5192).
Thus the current state (concerning at least my projects) is:
the current compiler makes slower and bigger code that the old compiler (using the same source and compiler options).