|
On 28/10/2014 5.15, Coda Highland wrote:
The main loop isn't doing a lot of work, but makes multiple calls to C functions (read the button states, draw things on the screen, read the clock). Does anyone have advice to improve performance?
Hard to say without analysing the architecture in detail, but (assuming interpreted Lua) you could try minimizing the number of times the language barrier is crossed. That would imply moving some relatively low-level jobs to the C(++) side, for example checking and pre-processing all the inputs, handling batches of drawing requests or, better yet, grouping them into higher-level requests.
And of course minimizing allocations and using a separate allocator if necessary (some testing required), but I guess you are already aware of that.
-- Enrico