[Solved] Simple Code Optimisation


If you need to be able to reference lil_patate elsewhere in your code then you can’t make this factorisation at all. If you don’t need to refer to lil_patate elsewhere then get rid of it and initialise patate directly from q_nutrients:

string patate(to_string(q_nutriments));

However, while this may improve the readability of the code, it doesn’t represent an optimisation in any technical sense.

2

solved Simple Code Optimisation