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语言性能不适合在移动端做图色模拟开发
相关推荐
没有bug.的程序员2 小时前
服务安全:内部服务如何防止“裸奔”?
java·网络安全·云原生安全·服务安全·零信任架构·微服务安全·内部鉴权
一线大码2 小时前
SpringBoot 3 和 4 的版本新特性和升级要点
java·spring boot·后端
秃了也弱了。2 小时前
python实现定时任务:schedule库、APScheduler库
开发语言·python
Dfreedom.2 小时前
从 model(x) 到__call__:解密深度学习框架的设计基石
人工智能·pytorch·python·深度学习·call
weixin_440730502 小时前
java数组整理笔记
java·开发语言·笔记
weixin_425023002 小时前
Spring Boot 配置文件优先级详解
spring boot·后端·python
weixin_425023002 小时前
Spring Boot 实用核心技巧汇总:日期格式化、线程管控、MCP服务、AOP进阶等
java·spring boot·后端
一线大码2 小时前
Java 8-25 各个版本新特性总结
java·后端
2501_906150563 小时前
私有部署问卷系统操作实战记录-DWSurvey
java·运维·服务器·spring·开源
better_liang3 小时前
每日Java面试场景题知识点之-TCP/IP协议栈与Socket编程
java·tcp/ip·计算机网络·网络编程·socket·面试题