Tip 1: Optimize code to run faster

1. Use constants with reference when passing values in between methods.
Advantage: It will reduce space and will be faster. If you use a new variable then an additional copy is made and there is a small memory hit.
Ex: method(string val)
optimal usage: method(const string &val)
Here we are passing the value by reference.

In

Leave a Reply

Your email address will not be published. Required fields are marked *