There is a list of hashes of several thousand. I need to see if the first character is not the same, then go through the 40 characters. StringInStr checks all 40 characters, while the width is the width of the search template, and it makes no sense to check start with all characters.
[ autoit ]
$vData = FileRead(@ScriptDir&'\SHA.txt') $sSHA = 'E18979B1542A4F499DD618CD52723D220507A268' $timer = TimerInit() $s = _Alike_Lines($vData, $sSHA) $timer = TimerDiff($timer) MsgBox(0, $s, 'Время : ' & Round($timer, 2) & ' мсек') Func _Alike_Lines($vData, $sSHA) $iStart = 1 For $i = 1 To Int(StringLen($vData) / 40) If StringInStr($vData, $sSHA, 2, 1, $iStart, 40) Then Return 1 $iStart += 40 Next EndFunc