At the beginning of a typical Arduboy sketch one includes the Arduboy2 library. If a particular sketch does not use certain functions of the library, are these functions included in the compiled result that gets uploaded to the Arduboy? In other words, is the compiler smart enough to leave out the stuff that is not required? Or would that require manual removal of these functions from the Arduboy library?
For the most part, yes. One exception is the font data and some text related functions, if you use the Arduboy2 class, due to the way the write() function (being virtual) has to be handled. This is why the Arduboy2Base class is provided for sketches that don’t use print() or other text functionality.