3 ms·
It isn't overhead to have a dynamic dispatch; you're traversing a runtime structure with variable shape. I can always construct a Map that will force you into a
by KirinDave 8y ago
It isn't overhead to have a dynamic dispatch; you're traversing a runtime structure with variable shape. I can always construct a Map that will force you into a the case of dynamic dispatch in JSON. The only way we could remove that overhead is by fully fixing the shape of the tree and all maps at compile time (which has its uses, but in a different context).
The fact that you can fuse multiple passes into one alteration (or reconstruction) of the tree is what's a removal of overhead.