From 295844f3f60732f429b56931905c538c764f7de6 Mon Sep 17 00:00:00 2001 From: "Alexey.Berezhnykh" Date: Wed, 26 Jun 2024 03:55:39 +0300 Subject: [PATCH] do not copy structs on compare --- src/Compiler/AbstractIL/ilread.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Compiler/AbstractIL/ilread.fs b/src/Compiler/AbstractIL/ilread.fs index 5f333fd2bd2..f1d6d52767f 100644 --- a/src/Compiler/AbstractIL/ilread.fs +++ b/src/Compiler/AbstractIL/ilread.fs @@ -858,10 +858,10 @@ let hsCompare (TaggedIndex(t1: HasSemanticsTag, idx1: int)) (TaggedIndex(t2: Has elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hcaCompare (TaggedIndex(t1: HasCustomAttributeTag, idx1: int)) (TaggedIndex(t2: HasCustomAttributeTag, idx2)) = - if idx1 < idx2 then -1 - elif idx1 > idx2 then 1 - else compare t1.Tag t2.Tag +let inline hcaCompare (t1: TaggedIndex) (t2: TaggedIndex) = + if t1.index < t2.index then -1 + elif t1.index > t2.index then 1 + else compare t1.tag t2.tag let mfCompare (TaggedIndex(t1: MemberForwardedTag, idx1: int)) (TaggedIndex(t2: MemberForwardedTag, idx2)) = if idx1 < idx2 then -1