FKainka / NanoESP

New NanoESP Library
19 stars 9 forks source link

Use object references rather object copies #6

Closed oflebbe closed 5 years ago

oflebbe commented 7 years ago

Throughout the code you will find String objects when calling methods. Help the compiler generate faster and smaller code by using string references.

For a discussion see Scott Meyer Effective C++ or for more recent discussion http://stackoverflow.com/questions/270408/is-it-better-in-c-to-pass-by-value-or-pass-by-constant-reference

With a tiny project of mine the code size has been dropped from 17150 Bytes to 16784 by this change alone.