Skip to content

大数相加问题以及jsPerf性能测试报告 #88

@Chenjiayuan195

Description

@Chenjiayuan195

https://jsperf.com/calc-compare-twice/
这一份是对比了两次while循环的substr,发现我的单次while循环基本上比它慢一点

https://jsperf.com/calc-compare-bit/
这一份是对比按位操作的,基本上单次循环的substr比它快

我的方法基本上处于两者之间,为保证测试结果测试用例参考的是issue中的,想请问一下老师,我的写法是否有改进的地方
ps:不知道为何我的jsperf无法添加snippet,没有那个按钮=。=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions