Skip to content

Commit 295844f

Browse files
committed
do not copy structs on compare
1 parent 3bd447f commit 295844f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Compiler/AbstractIL/ilread.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@ let hsCompare (TaggedIndex(t1: HasSemanticsTag, idx1: int)) (TaggedIndex(t2: Has
858858
elif idx1 > idx2 then 1
859859
else compare t1.Tag t2.Tag
860860

861-
let hcaCompare (TaggedIndex(t1: HasCustomAttributeTag, idx1: int)) (TaggedIndex(t2: HasCustomAttributeTag, idx2)) =
862-
if idx1 < idx2 then -1
863-
elif idx1 > idx2 then 1
864-
else compare t1.Tag t2.Tag
861+
let inline hcaCompare (t1: TaggedIndex<HasCustomAttributeTag>) (t2: TaggedIndex<HasCustomAttributeTag>) =
862+
if t1.index < t2.index then -1
863+
elif t1.index > t2.index then 1
864+
else compare t1.tag t2.tag
865865

866866
let mfCompare (TaggedIndex(t1: MemberForwardedTag, idx1: int)) (TaggedIndex(t2: MemberForwardedTag, idx2)) =
867867
if idx1 < idx2 then -1

0 commit comments

Comments
 (0)