if (a < 101) 是否比 if (a <= 100) 快,請分別解釋 javascript 和 php ?
我在 javascript 檔案
Initial Code 中編輯了一些代碼
rect.top>=0&&rect.left>=0&&rect.top<=(window.innerHeight||document.documentElement.clientHeight)
修改代碼后
rect.top>-1&&rect.left>-1&&rect.top<=(window.innerHeight||document.documentElement.clientHeight)
但是我的前輩說它不會讓它變快。所以請幫忙。
uj5u.com熱心網友回復:
不,它不是更快。在每個可能的 CPU 的微代碼中,這兩個比較>并>=轉換為相同長度的指令。它不依賴于所使用的編程語言。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/314091.html
標籤:javascript php 表现 页面速度
