deep extend
JavaScript performance comparison
Preparation code
<script src="https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.js">
<script>
Benchmark.prototype.setup = function() {
o = {
string:'a',
int: 1,
array: [1,2,3],
oarray: [{'one':1, 'two':'two'}, {'_one':1, '_two':'_two'}]
}
e = {
string: 'b',
string2: 'a',
array: [1,2]
}
};
</script>