Skip to content

Compile with optimizations

Latest
Compare
Choose a tag to compare
@jkilpatr jkilpatr released this 09 Dec 12:34
0bcc4c9
Set default opt level to O3

This patch sets the default opt level to O3 rather than Os meaning to
optimize strongly for speed instead of optimizing for size, this roughly
doubles the binary size from 100kb -> 190kb in my tests. But the
resulting binary performs 3-4x better.

On our target devices we have 90kb to spare and need every ounce of
performance we can get to keep babel networks from going unstable when
an individual router has many neighbors.

The new opt level causes some compiler warnings that where not
previously present, these are muted as they are warning of intended
behavior. Our fixed size target strings do not need to be null
terminated and we do intend to truncate longer strings if provided.