ConorMcPersonal / Toaster

The greatest ever Spectrum game based purely around the toast concept
Apache License 2.0
0 stars 1 forks source link

Optimisation! #73

Open mcmenaminadrian opened 7 months ago

mcmenaminadrian commented 7 months ago

Can we shave off a cycle here and there by optimising the code?

ConorMcPersonal commented 7 months ago

Taken from here: https://github.com/z88dk/z88dk/blob/master/doc/overview.md

zcc +zx -vn -SO3 -clib=sdcc_iy -startup=31 --max-allocs-per-node200000 @sp1demo.lst -o demo -create-app

think for us this goes to:

zcc +zx -S03 -startup=1 -clib=sdcc_iy --max-allocs-per-node200000 -D_TEST_GAME numbers.c face.c slot.c slot_monitor.c game.c control.c music.c util.c bread.c customer.c base.c -o game -create-app

This increases compile time but will make more aggressive optimisations.

ConorMcPersonal commented 7 months ago

That's not to preclude actually optimizing the code of course - but let's make sure we're getting extra cycles out of it, not just changing for the sake of it.

mcmenaminadrian commented 7 months ago

OK, but let's do the compiler stuff at the very end. I think I can shave off a few cycles here and there in other ways too