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
Javascript Shallow Clone vs. Structured clone Performance
const sampleMap = new Map([
["a", [11,12,13,14,15,16,7,8,9,10]],
["b", [1,2,3,4,5,6,17,18,9,10]],
["c", [1,2,3,4,5,61,17,8,9,10]],
["d", [1,2,3,4,15,6,7,8,9,10]],
["e", [1,2,3,4,15,6,7,8,9,10]],
["f", [1,2,32,4,521,6,7,8,9,10]],
["g", [1,2,33,4,5,6,7,8,9,10]],
["h", [1,2,43,4,5,68,7,8,9,10]],
["i", [1,2,53,4,5,6,7,8,9,10]],
["j", [1,2,3,64,75,6,7,8,9,10]],
])Ready to run.
| Test | Ops/sec | |
|---|---|---|
| Shallow copy using Constructor | | ready |
| Deep copy using structuredClone | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.