返回列表 发布新帖

先入先出的泛型方法 大量节约扫描周期, 避免了使用For 循环

412 0
发表于 2024-7-10 18:16:53 | 查看全部 阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
<h4 class="moreLine" style="text-wrap: wrap; box-sizing: border-box; font-family: &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, &quot;Noto Sans CJK SC&quot;, &quot;WenQuanYi Micro Hei&quot;, Arial, sans-serif; padding: 0px; margin: 0px 16px 0px 0px; line-height: 24px; outline: 0px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51) !important; font-weight: normal !important; font-size: 14px !important;">众所周知FOR循环是很容易拉搞PLC扫描周期的,那么如何避免呢</h4><h4 class="moreLine" style="box-sizing: border-box; font-family: &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, &quot;Noto Sans CJK SC&quot;, &quot;WenQuanYi Micro Hei&quot;, Arial, sans-serif; padding: 0px; margin: 0px 16px 0px 0px; line-height: 24px; outline: 0px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: wrap; background-color: rgb(255, 255, 255); color: rgb(51, 51, 51) !important; font-weight: normal !important; font-size: 14px !important;">先入先出的泛型方法 大量节约扫描周期, 避免了使用For 循环<br/></h4><p style="box-sizing: border-box; font-family: &quot;Noto Sans SC&quot;, &quot;Microsoft YaHei&quot;, ΢���ź�, -apple-system, BlinkMacSystemFont, &quot;segoe ui&quot;, Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51);">容器是泛型, 没有指明类型, 可以操作任何数据类型, 先入先出, 而且避免了For循环 , 大量节约了扫描周期, 测试过80万长度的数组 也可以不增加扫描周期的情况下 完成,</p><p style="box-sizing: border-box; font-family: &quot;Noto Sans SC&quot;, &quot;Microsoft YaHei&quot;, ΢���ź�, -apple-system, BlinkMacSystemFont, &quot;segoe ui&quot;, Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51);">优化的和非优化的 都可以。</p><p style="box-sizing: border-box; font-family: &quot;Noto Sans SC&quot;, &quot;Microsoft YaHei&quot;, ΢���ź�, -apple-system, BlinkMacSystemFont, &quot;segoe ui&quot;, Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51);"><br/></p><p><br/></p>

回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright © 2001-2025 英威腾技术论坛 版权所有 All Rights Reserved. 粤ICP备07504406号
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表