After attempting several implementations for deep comparison and copying for JSON-serializable objects, I've noticed the fastest often are just:
function deep_clone(a){
return JSON.parse(JSON.stringify(a));
};
function is_equal(a,b){
return JSON.stringify(a) === JSON.stringify(b);
};
I feel like this is cheating, though. Like I'll find some problem that will annoy me on future. Is it fine to use those?