From d6402c624ed95ae1764b0872bea58623ecc486cb Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 7 Mar 2023 19:14:43 +0600 Subject: [PATCH] optimization of nonstrict comparison --- .../commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt index ef27b7f5b5b..e93bc3488de 100644 --- a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt +++ b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/DiffUtils.kt @@ -174,7 +174,7 @@ fun Iterable.calculateDiff( } } else { { t1, t2 -> - t1 == t2 + t1 === t2 || t1 == t2 // small optimization for cases when t1 and t2 are the same - comparison will be faster potentially } } )