##python --100次找色用時92120毫秒
from airscript.screen import FindColors
from time import time
t1=time()
for i in range(100):
p=FindColors("888,888,#000000").rect(0,0,1080,2400).find()
t2=time()
print(f'用時{round((t2-t1)*1000)}毫秒')# 用時92120毫秒
##結(jié)論:python語言性能不適合在移動端做圖色模擬開發(fā)
--lua --100次找色用時3217毫秒
t1=time()
for i=1,100,1 do
p=findColor({0,0,1080,2400,"888,888,#000000",95})
end
t2=time()
print("用時"..(t2-t1).."毫秒")-- 用時3217毫秒
--結(jié)論:python語言性能不適合在移動端做圖色模擬開發(fā)
文章來源地址http://www.zghlxwxcb.cn/news/detail-700996.html
文章來源:http://www.zghlxwxcb.cn/news/detail-700996.html
到了這里,關(guān)于python語言性能不適合在移動端做圖色模擬開發(fā),推薦用lua的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!