Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

while循环效率问题 #4

Open
lingtoo opened this issue Sep 21, 2019 · 1 comment
Open

while循环效率问题 #4

lingtoo opened this issue Sep 21, 2019 · 1 comment

Comments

@lingtoo
Copy link

lingtoo commented Sep 21, 2019

我对clone4的DEMO文件涉及到的WHILE循环的效率表示质疑,本地测试到的结果(node环境):

clone1 在前,clone2在后, 结果:

undefined: 0.167ms
undefined: 0.126ms

将 clone1 跟 clone2 调下位置,即clone2放在前面,结果:

undefined: 0.254ms
undefined: 0.081ms

即所消耗的时间跟调用的先后顺序有关,而不是WHILE循环的优化结果,不知你怎么看?

@Canight
Copy link

Canight commented Apr 9, 2021

我对clone4的DEMO文件涉及到的WHILE循环的效率表示质疑,本地测试到的结果(node环境):

clone1 在前,clone2在后, 结果:

undefined: 0.167ms
undefined: 0.126ms

将 clone1 跟 clone2 调下位置,即clone2放在前面,结果:

undefined: 0.254ms
undefined: 0.081ms

即所消耗的时间跟调用的先后顺序有关,而不是WHILE循环的优化结果,不知你怎么看?

https://blog.csdn.net/haochuan9421/article/details/81414532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants