InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Size optimise NRF SDK build

Open mark9064 opened this issue 1 year ago • 1 comments

Currently the NRF SDK is built with -O3 rather than -Os like with everything else

This saves a bit of flash space and performance seems unchanged to me. Thoughts on this change? I could definitely see the performance improvement being justified if it exists, but I don't have a profiler or anything.

mark9064 avatar Aug 23 '24 13:08 mark9064

Build size and comparison to main:

Section Size Difference
text 374328B -4572B
data 948B 0B
bss 63480B -8B

github-actions[bot] avatar Aug 23 '24 13:08 github-actions[bot]

I can't remember why we specified -O3 specifically for that target. The history is not clear about that, it was changed from -Os back and forth to -O3 multiple times with many merges... :/

I guess we can merge this if you didn't notice any unwanted side-effects :)

JF002 avatar Sep 14 '24 09:09 JF002

I think if we wanted to O3 a specific part it would make the most sense to do that to LVGL as that's the biggest CPU cruncher. But I haven't had time to try that yet

mark9064 avatar Sep 14 '24 09:09 mark9064