object cloning
JavaScript performance comparison
Preparation code
<script>
var options = {
"missing": {
"enabled": true,
"preview": 2,
"hover": {
"enabled": false,
"timeout": 0.5
},
"global": true
},
"expert": {
"enabled": true,
"answers": {
"preview": 2
},
"tips": {
"preview": 3
},
"hover": {
"enabled": true,
"timeout": 0.5
},
"global": true
},
"auth": {
"login": "",
"password": "",
"password_hash": ""
},
"urlinfo": {
"age": true,
"prevclick": true
},
"survey": {
"enabled": true
}
}
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
eval/uneval |
|
pending… |
json parse/stringify |
|
pending… |
cloning properties |
|
pending… |
cloning prototype |
|
pending… |
object.create |
|
pending… |
fastest cross-browser way |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Nikolay Frantsev
- Revision 2: published
- Revision 3: published by Nikolay Frantsev
0 comments