Use min() instead of sorted().first()
Proprietarysorted().first() does an O(n log n) sort just to read the minimum. min() finds it in a single linear pass.
org. openrewrite. kotlin. performance. UseMinForSortedFirst$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. UseMinForSortedFirst$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.