Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added this to avoid bloat from exception related stuff in libstdc++, but there's a problem.
newlib-nano
is usually built with-Os
, this results in disabling the optimisedmemcpy
/memset
/... implementations.memcpy
/memset
in the bootrom so these aren't used in the end. RP2350 does not... so they do.memcpy
to amemcpy
(similar formemset
), but if you were copying words it makes it 4x slower.So, this goes back to the default but tries to keep most of the space savings by avoiding the default terminate handler.
For a somewhat extreme performance comparison, this is 15 -> 10ms on my 3d engine (rasterise time).
Size comparison:
logo
before (withnano.specs
)logo
withoutnano.specs
(ouch, +31k)
logo
after (withoutnano.specs
, overridden terminate handler)(just +6.3k)
(32blit-stm32 has a similar problem, which we can fix there by rebuilding our custom newlib with
-O2
(+3k onlogo
, +2.4k onfirmware
))