Code size

This is my attempt answer the question "Does a bigger number of lines of code make the program run slower?".

Let's assume that the sketch has a number of functions defined (and implemented, of course), adding a lot of lines to the program.

There may be 2 situations here:

  1. loop() calls a number (or all) of these functions;
  2. loop does not call any of these functions;

In case 1, the program will run slower, of course.
In case 2, the program will run as fast as if the functions would not be defined at all.

In both cases, the program is as big, regardless of the the fact that the functions are called or not (at least this happens in Arduino 011 which I am currently using).

So, the compiler generates code for all the defined functions, but that does not mean that the loop() gets executed slower, unless those functions are called in the loop().

Does this make sense?