lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 01/06: Lucene.Net.Index.DocTermOrds: Removed unnecessary O(n) operation (call to .ToList())
Date Wed, 08 Jan 2020 08:35:10 GMT
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 4517cdc56c05fca5c49a13b85c002a70ed63609e
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Tue Jan 7 20:00:20 2020 +0700

    Lucene.Net.Index.DocTermOrds: Removed unnecessary O(n) operation (call to .ToList())
---
 src/Lucene.Net/Index/DocTermOrds.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Lucene.Net/Index/DocTermOrds.cs b/src/Lucene.Net/Index/DocTermOrds.cs
index 424e6b7..af9d76d 100644
--- a/src/Lucene.Net/Index/DocTermOrds.cs
+++ b/src/Lucene.Net/Index/DocTermOrds.cs
@@ -819,7 +819,7 @@ namespace Lucene.Net.Index
                     return SeekStatus.FOUND;
                 }
 
-                int startIdx = outerInstance.m_indexedTermsArray.ToList().BinarySearch(target);
+                int startIdx = Array.BinarySearch(outerInstance.m_indexedTermsArray, target);
 
                 if (startIdx >= 0)
                 {


Mime
View raw message