# Algorithmic Efficiency

Record: `arch:algorithmic-efficiency`
Kind: principle
Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
Severity: contextual
Scope: algorithm, data structure
Canonical: https://banes-lab.com/ontology#arch-algorithmic-efficiency

## Repair

- Refactored by: Replace Algorithm, Add Index, Change Data Structure
- Detected by: complexity analysis, benchmark slope
- Violated by: avoidable quadratic/exponential behavior
- Measured by: time/space complexity
- Enforced by: [review](https://banes-lab.com/records/lex/review.md), benchmarks

## requires

- [Complexity Awareness](https://banes-lab.com/records/lex/complexity-awareness.md)

## reinforces

- [Scalability](https://banes-lab.com/records/arch/scalability.md)

## enables

- [Efficient Processing](https://banes-lab.com/records/lex/efficient-processing.md)

## conflicts-with

- [Inefficient Algorithm Choice](https://banes-lab.com/records/lex/inefficient-algorithm-choice.md)
- [N Plus One Query](https://banes-lab.com/records/arch/n-plus-one-query.md)

## tensions-with

- [Implementation Simplicity](https://banes-lab.com/records/lex/implementation-simplicity.md)

## tensions

- [Algorithmic Efficiency Implementation Simplicity](https://banes-lab.com/records/tension/algorithmic-efficiency-implementation-simplicity.md)

## referenced-by

- [Time Complexity](https://banes-lab.com/records/arch/time-complexity.md)
- [Big O Notation](https://banes-lab.com/records/arch/big-o-notation.md)
