deep extend 2
JavaScript performance comparison
Preparation code
<script src="https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.js">
<script>
Benchmark.prototype.setup = function() {
original = {
next: {
tmpl: 'next',
func: function() {
return 'next'
}
},
prev: {
tmpl: 'next',
func: function() {
return 'prev'
}
}
}
extend = {
next: {
tmpl: '_next'
},
event: 'click #button'
}
extended = {
next: {
tmpl: '_next',
func: function() {
return 'next'
},
event: 'click #button'
},
prev: {
tmpl: 'next',
func: function() {
return 'prev'
}
}
}
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
lodash |
|
pending… |
lodash2 |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments