The following are characteristics of high-performance code:
- Functions are small and can be optimized easily (S in SOLID).
- Functions contains simple logic rather than complex logic (KISS).
- Numeric data is laid out in contiguous memory space so the compiler can fully utilize CPU hardware.
- Memory allocation should be kept to a minimum to avoid excessive garbage collection.
Performance is an important aspect of any software project. It is particularly important for data science, machine learning, and scientific computing use cases. A small design change can make a big difference—depending on the situation, it could possibly turn a 24-hour process into a 30-minute process. It could also give users real-time experience when using a web application rather than a please wait... dialog.
Next, we will discuss software maintainability as another software quality objective.