python语言性能不适合在移动端做图色模拟开发,推荐用lua

python 复制代码
##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毫秒
##结论:python语言性能不适合在移动端做图色模拟开发
lua 复制代码
--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毫秒


--结论:python语言性能不适合在移动端做图色模拟开发
相关推荐
是小蟹呀^5 小时前
Spring Security + JWT 面试题整理
java·jwt·springsecurity
tkevinjd6 小时前
MiniCode 项目详解6:原项目控制系统的10个缺陷(已修复)
python·llm·agent
dNGUZ7UGj7 小时前
10分钟完成第一个Python小游戏
python·django
没有梦想的咸鱼185-1037-16637 小时前
AI-Python机器学习与深度学习技术:CNN/Transformer/扩散模型、SHAP可解释及Hermes智能体自动化
人工智能·python·深度学习·机器学习·chatgpt·cnn·transformer
spencer_tseng7 小时前
Redis + Nacos.bat
java·windows·dos
霸道流氓气质7 小时前
SpringBoot中通用工具类库(Utils)封装与使用实践
spring boot·后端·python
troyzhxu8 小时前
列表查询的 GraphQL —— 一行代码终结你的 if-else 地狱!
java·springboot·graphql
孫治AllenSun8 小时前
【DataX】生产环境搭建DataX集群案例
java·开发语言·jvm
Draina9 小时前
CBC填充预言攻击-CBC Padding Oracle Crypto Attack
python·安全·web安全·网络安全·密码学·安全性测试