user32161: 
I'm working on a program composed by several classes.
I reduced the size of a single class of (more or less) one hundred lines (4kb of stuff)
I expected a smaller sketch but surprisingly it is increased in size (few bytes).


How is it possible?It's something about the compiler?

user31802: A compiler translates c/cpp to target assembly language.
To keep it short, some c/cpp language statements or keywords can be used to shorten the code (in c/cpp)... but the mechanics behind all that to translate to assembly can generate more instructions than you thought.
It would maybe be easier to explain if you put some example...

32161: <p><br>
I'm working on a program composed by several classes.<br>
I reduced the size of a single class of (more or less) one hundred lines (4kb of stuff)<br>
I expected a smaller sketch but surprisingly it is increased in size (few bytes).
<br>
<br>
How is it possible?It's something about the compiler?</p>
 31802: <p>A compiler translates c/cpp to target assembly language.</p>

<p>To keep it short, some c/cpp language statements or keywords can be used to shorten the code (in c/cpp)... but the mechanics behind all that to translate to assembly can generate more instructions than you thought.</p>

<p>It would maybe be easier to explain if you put some example...</p>
