jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
测试深克隆lodash.cloneDeep()与JSON.parse(JSON.stringify())谁的速度快
<script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.js"></script>
const obj = {
date: '2016-05-03',
name: '美小团',
province: '北京',
city: '朝阳区',
address: '北京市朝阳区望京东路四号',
zip: 200333,
tag: '家',
}
Ready to run.
Test | Ops/sec | |
---|---|---|
cloneDeep(obj) |
| ready |
JSON.parse(JSON.stringify(obj)) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.