performance.algorithmic

Nested loops in hot path (O(n²) risk)

Nested loops in the same function should be reviewed for quadratic work on larger inputs.

#Metadata

#Why it matters

Nested iteration often becomes the dominant cost on hot paths and usually benefits from indexing or precomputation.

#Remediation

Precompute lookups, index one side with a set or map, or otherwise flatten the repeated scan.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.performance.nested-loops-hot-path.rule.yaml.