It doesn't really matter whether the
hexfile is of the same size or not, since different compilers of different versions will compile the same source file differently and at the end you'll stil get the same outcome.
Could you please tell us why do you want to get the same
hexfile size after you compile?
What do you want to achieve?