Skip to content

while循环效率问题 #4

@lingtoo

Description

@lingtoo

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

clone1 在前,clone2在后, 结果:

undefined: 0.167ms
undefined: 0.126ms

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

undefined: 0.254ms
undefined: 0.081ms

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions