mbostock/d3 — pull request #2065 by mbostock (2014-10-14 17:13:32+00:00)
Title: Optimize d3.{map,set}.

Rather than always escaping keys with a null-prefix, only escape keys that can conflict with built-in properties (either on Object, d3_Map or d3_Set). By only prefixing these special keys, we can avoid the cost of constructing new strings in the common case.

To check whether a key is special, we check whether it is in an empty map instance. In addition, keys that are already null-prefixed must be prefixed a second time to correctly unescape.