Sketch size changing when changing board type

Hi,

I'm doing a project which was initially designed with an UNO and adapted to work on a Micro

I've noticed when compiling the code that the size of the sketch increases from 18,718 bytes with UNO selected to 21,140 bytes with Micro selected. This is annoying because the micro has 4k less memory thanks to a larger bootloader.

Can anyone tell me why the sketch size increases so much?

Thanks!

Can anyone tell me why the sketch size increases so much?

For one thing, the Micro has two serial ports. That means two instances of the HardwareSerial class, with two input buffers and two output buffers.

I'm sure that there are other things that affect the sketch size, too.