It seems dom/data.js is the perfect candidate for using a Map instead of the custom implementation.
Map