You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace List.length comparisons with List.is_empty for O(1) checks
List.length traverses the entire list (O(n)) just to compare against
zero. List.is_empty is a constant-time check and is already the
established idiom elsewhere in the codebase.
Changed in:
- Warnings.ml: List.length warnings > 0 → not (List.is_empty warnings)
- Optimize.ml: List.length l' = 0 → List.is_empty l' (3 occurrences)
0 commit comments