9月202025
Au3数组的高效去重
因有20w+行的文本进行去重处理,效率老提不起来。
最后还是回到利用字典对象进行操作,高 效 秒 级
;字典去重
Func JY_ArrDictUnique1D($_oArr)
Local $dict = ObjCreate("scripting.dictionary")
If Not IsObj($dict) Then
MsgBox(0,"错误","创建对象失败!",5)
Exit 0
EndIf
For $n = 0 To UBound($_oArr)-1
$dict($_oArr[$n])=""
Next
Return $dict.keys
EndFunc
相关文章: https://www.jianyiit.com/post-11.html
扫描二维码,在手机上阅读