This actually contains 2 questions.
1) You are given a project which turned out to produce code which can’t fit to the memory restrictions of the environment. What could you do to handle this?
2) You are given a project which turned out to be performing slow than expected. How do you handle this?
The answers I could think of:
1) Using std library as much as possible because probably they are loaded anyway, Modularizing the code with functions to avoid rewriting duplicate code which might conserve the stack space.
2) Introducing inline functions wherever necessary to reduce function lookup overhead, compiler optimizations may be(if not I’m using volatile)?
Please give as many possible solutions as possible 🙂
Identify how much code footprint is permitted and then apply various code refactoring methods to reduce the current footprint to fit the permitted size.
Profile the project to find performance bottlenecks, Within the identified bottlenecks, identify the
20%of the total code that runs90%of the exectuion time of the project and then target that code for optimization.