Skip to content

Latest commit

 

History

History

code-performance

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Code Performance

We need to be observing things that can possibly make a program slow or perform sub-optimally in production. Things to watch out for include the following:

  • Complexity - Watch out for nested for loops. It’s not always a bad thing but see if there are ways to refactor code like this to be less complex. It is important to create an awareness in the reviewee to always look for ways to optimize the running time of their code.
  • Efficiency - Encourage the use of better data structures or faster algorithms to solve problems. A typical example of this would be using a dictionary for grouped data instead of using multiple lists or declaring unnecessary variables.
  • Memory management - Instill a mindset in the reviewee to always think about ways to optimize memory usage in their code. An Android Developer for instance should be encouraged as much as possible to ensure to cleanup afterwards to ensure there are no unused variables and memory leaks. Scenarios?
  • Design Patterns - Design patterns besides being accepted ways of solving repetitive problems can also lead to more efficient programs in terms of time and space. Wherever applicable, ensure reviewees are applying design patterns to solve general repetitive problems. Examples?