kieranhj / stnicc-beeb

Port of STNICCC-2000 for the BBC Micro.

Home Page:https://bitshifters.github.io/posts/prods/bs-beeb-niccc.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline plot functions

kieranhj opened this issue · comments

Once we believe there's no more juice to squeeze out of the code, final optimisation would be to directly inline the plot_span function into plot_poly_span and maybe even inline plot_poly_span into parse_frame.

This would remove the 6c JMP/JMP overhead per fn call which is considerable across the entire sequence. It will, however, make the code very hard to read / maintain.

Heh. This doesn't actually help in the end as the loop becomes so large that we end up needing an additional jmp to the short_span routine and then a jmp to complete the loop.